# HG changeset patch # User Richard Taylor # Date 1272971473 -3600 # Node ID 8ac72bc37dd60e177b0723788d556834a24e14f5 # Parent 54a88b895bcda3df25051d545027f60717ece845# Parent 5732243e83c12663f6102c7f0a8679c7660944fa merge from team wip diff -r 5732243e83c1 -r 8ac72bc37dd6 sbsv2/raptor/RELEASE-NOTES.html --- a/sbsv2/raptor/RELEASE-NOTES.html Fri Apr 30 16:56:53 2010 +0100 +++ b/sbsv2/raptor/RELEASE-NOTES.html Tue May 04 12:11:13 2010 +0100 @@ -13,6 +13,7 @@
  • Pass parameters to log filters from the command line
  • Work-around for failed RVCT 2.2 compiles
  • +
  • Obtain configuration data using --query option
  • Carbide.xml now contains *_gcce aliases
  • diff -r 5732243e83c1 -r 8ac72bc37dd6 sbsv2/raptor/examples/os_properties.xml --- a/sbsv2/raptor/examples/os_properties.xml Fri Apr 30 16:56:53 2010 +0100 +++ b/sbsv2/raptor/examples/os_properties.xml Tue May 04 12:11:13 2010 +0100 @@ -18,6 +18,7 @@ + diff -r 5732243e83c1 -r 8ac72bc37dd6 sbsv2/raptor/lib/config/arm.xml --- a/sbsv2/raptor/lib/config/arm.xml Fri Apr 30 16:56:53 2010 +0100 +++ b/sbsv2/raptor/lib/config/arm.xml Tue May 04 12:11:13 2010 +0100 @@ -79,7 +79,6 @@ - @@ -92,6 +91,7 @@ + @@ -103,6 +103,7 @@ + diff -r 5732243e83c1 -r 8ac72bc37dd6 sbsv2/raptor/lib/config/gcc.xml --- a/sbsv2/raptor/lib/config/gcc.xml Fri Apr 30 16:56:53 2010 +0100 +++ b/sbsv2/raptor/lib/config/gcc.xml Tue May 04 12:11:13 2010 +0100 @@ -74,10 +74,11 @@ - + + - + @@ -85,8 +86,9 @@ - - + + + @@ -94,10 +96,11 @@ - + + - - + + diff -r 5732243e83c1 -r 8ac72bc37dd6 sbsv2/raptor/lib/config/make.xml --- a/sbsv2/raptor/lib/config/make.xml Fri Apr 30 16:56:53 2010 +0100 +++ b/sbsv2/raptor/lib/config/make.xml Tue May 04 12:11:13 2010 +0100 @@ -55,7 +55,7 @@ - + @@ -63,7 +63,7 @@ - + @@ -79,7 +79,7 @@ - + @@ -87,7 +87,7 @@ - + @@ -98,6 +98,6 @@ - + diff -r 5732243e83c1 -r 8ac72bc37dd6 sbsv2/raptor/lib/config/root.xml --- a/sbsv2/raptor/lib/config/root.xml Fri Apr 30 16:56:53 2010 +0100 +++ b/sbsv2/raptor/lib/config/root.xml Tue May 04 12:11:13 2010 +0100 @@ -45,6 +45,7 @@ + - + diff -r 5732243e83c1 -r 8ac72bc37dd6 sbsv2/raptor/lib/config/winscw.xml --- a/sbsv2/raptor/lib/config/winscw.xml Fri Apr 30 16:56:53 2010 +0100 +++ b/sbsv2/raptor/lib/config/winscw.xml Tue May 04 12:11:13 2010 +0100 @@ -127,7 +127,7 @@ - + @@ -135,17 +135,19 @@ - - + + + - + + - - + + diff -r 5732243e83c1 -r 8ac72bc37dd6 sbsv2/raptor/lib/flm/e32abiv2.flm --- a/sbsv2/raptor/lib/flm/e32abiv2.flm Fri Apr 30 16:56:53 2010 +0100 +++ b/sbsv2/raptor/lib/flm/e32abiv2.flm Tue May 04 12:11:13 2010 +0100 @@ -170,13 +170,12 @@ IMPORTLIBTARGETVERSIONED_DSO:=$(VER_E32IMPORTLIBBASE).dso endif - # ABIv1 .lib (for specific builds, toolchains and host OS platforms only) + # ABIv1 .lib (for specific kits and toolchains only) IMPORTLIBTARGET_LIB:= IMPORTLIBTARGETVERSIONED_LIB:= BUILDMARKER_IMPORTLIBTARGET_LIB:=TARGET_$(subst :,,$(VER_E32IMPORTLIBBASE)).lib - # Only for builds that require and support them, and only on windows - ifeq ($(OSTYPE),cygwin) - ifeq ($(GENERATE_ABIV1_IMPLIBS),1) + # Only for kits that require and tools that support them + ifneq ($(SUPPORTS_ABIV1_IMPLIBS),) WHATRELEASE:=$(WHATRELEASE) $(if $(EXPLICITVERSION),,$(TMP_IMPORTLIBTARGET_ROOT).lib) WHATRELEASE:=$(WHATRELEASE) $(VER_E32IMPORTLIBBASE).lib ifeq ($($(BUILDMARKER_IMPORTLIBTARGET_LIB)),) @@ -184,7 +183,6 @@ IMPORTLIBTARGETVERSIONED_LIB:=$(VER_E32IMPORTLIBBASE).lib endif endif - endif endif # Try to make sure that we get the right linkas name diff -r 5732243e83c1 -r 8ac72bc37dd6 sbsv2/raptor/lib/flm/standard.xml --- a/sbsv2/raptor/lib/flm/standard.xml Fri Apr 30 16:56:53 2010 +0100 +++ b/sbsv2/raptor/lib/flm/standard.xml Tue May 04 12:11:13 2010 +0100 @@ -122,7 +122,6 @@ - @@ -179,6 +178,7 @@ + diff -r 5732243e83c1 -r 8ac72bc37dd6 sbsv2/raptor/notes/query_cli.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/notes/query_cli.txt Tue May 04 12:11:13 2010 +0100 @@ -0,0 +1,18 @@ + +A new --query command-line option allows other tools to easily read raptor's +configuration data without having to understand exactly how raptor config +files work. + +For example, all the valid build aliases which can be used to build with +the -c option can be obtained using: + +sbs --query=aliases + +All the known product variants can be obtained using: + +sbs --query=products + +And the details of a particular configuration can be found using: + +sbs --query=config[armv5_urel.n8] + diff -r 5732243e83c1 -r 8ac72bc37dd6 sbsv2/raptor/python/raptor.py --- a/sbsv2/raptor/python/raptor.py Fri Apr 30 16:56:53 2010 +0100 +++ b/sbsv2/raptor/python/raptor.py Tue May 04 12:11:13 2010 +0100 @@ -448,9 +448,10 @@ created by the Main function. When operated by an IDE several Raptor objects may be created and operated at the same time.""" - + # mission enumeration M_BUILD = 1 - M_VERSION = 2 + M_QUERY = 2 + M_VERSION = 3 def __init__(self, home = None): @@ -520,7 +521,8 @@ self.noDependInclude = False self.noDependGenerate = False self.projects = set() - + self.queries = [] + self.cache = raptor_cache.Cache(self) self.override = {env: str(self.home)} self.targets = [] @@ -717,6 +719,11 @@ self.projects.add(projectName.lower()) return True + def AddQuery(self, q): + self.queries.append(q) + self.mission = Raptor.M_QUERY + return True + def FilterList(self, value): self.filterList = value return True @@ -1219,6 +1226,31 @@ return layers + def Query(self): + "process command-line queries." + + if self.mission != Raptor.M_QUERY: + return 0 + + # establish an object cache based on the current settings + self.LoadCache() + + # our "self" is a valid object for initialising an API Context + import raptor_api + api = raptor_api.Context(self) + + print "" % raptor_version.numericversion() + + for q in self.queries: + try: + print api.stringquery(q) + + except Exception, e: + self.Error("exception '%s' with query '%s'", str(e), q) + + print "" + return self.errorCode + def Build(self): if self.mission != Raptor.M_BUILD: # help or version requested instead. @@ -1356,6 +1388,9 @@ # object which represents a build b = Raptor.CreateCommandlineBuild(argv) + if b.mission == Raptor.M_QUERY: + return b.Query() + return b.Build() diff -r 5732243e83c1 -r 8ac72bc37dd6 sbsv2/raptor/python/raptor_api.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/python/raptor_api.py Tue May 04 12:11:13 2010 +0100 @@ -0,0 +1,221 @@ +# +# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of the License "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# +# raptor_api module +# +# Python API for Raptor. External code should interact with Raptor via this +# module only, as it is the only programatic interface considered public. The +# command line --query option is also implemented using this module. + +# constants +ALL = 1 + +# objects + +class Reply(object): + """object to return values from API calls. + """ + def __init__(self, text=""): + self.text = text + + def __str__(self): + name = type(self).__name__.lower() + + string = "<" + name + children = [] + longend = False + + for attribute,value in self.__dict__.items(): + if attribute != "text": + if isinstance(value, Reply): + children.append(value) + else: + string += " %s='%s'" % (attribute, value) + + if children or self.text: + string += ">" + longend = True + + if self.text: + string += self.text + + if children: + string += "\n" + + for c in children: + string += str(c) + + if longend: + string += "\n" % name + else: + string += "/>\n" + + return string + +class Alias(Reply): + def __init__(self, name, meaning): + super(Alias,self).__init__() + self.name = name + self.meaning = meaning + +class Config(Reply): + def __init__(self, fullname, outputpath): + super(Config,self).__init__() + self.fullname = fullname + self.outputpath = outputpath + +class Product(Reply): + def __init__(self, name): + super(Product,self).__init__() + self.name = name + +import generic_path +import raptor +import raptor_data +import re + +class Context(object): + """object to contain state information for API calls. + + For example, + + api = raptor_api.Context() + val = api.getaliases("X") + """ + def __init__(self, initialiser=None): + # this object has a private Raptor object that can either be + # passed in or created internally. + + if initialiser == None: + self.__raptor = raptor.Raptor() + else: + self.__raptor = initialiser + + def stringquery(self, query): + """turn a string into an API call and execute it. + + This is a convenience method for "lazy" callers. + + The return value is also converted into a well-formed XML string. + """ + + if query == "aliases": + aliases = self.getaliases() + return "".join(map(str, aliases)).strip() + + elif query == "products": + variants = self.getproducts() + return "".join(map(str, variants)).strip() + + elif query.startswith("config"): + match = re.match("config\[(.*)\]", query) + if match: + config = self.getconfig(match.group(1)) + return str(config).strip() + else: + raise BadQuery("syntax error") + + raise BadQuery("unknown query") + + def getaliases(self, type=""): + """extract all aliases of a given type. + + the default type is "". + to get all aliases pass type=ALL + """ + aliases = [] + + for a in self.__raptor.cache.aliases.values(): + if type == ALL or a.type == type: + # copy the members we want to expose + aliases.append( Alias(a.name, a.meaning) ) + + return aliases + + def getconfig(self, name): + """extract the values for a given configuration. + + 'name' should be an alias or variant followed optionally by a + dot-separated list of variants. For example "armv5_urel" or + "armv5_urel.savespace.vasco". + """ + names = name.split(".") + if names[0] in self.__raptor.cache.aliases: + x = self.__raptor.cache.FindNamedAlias(names[0]) + + if len(names) > 1: + fullname = x.meaning + "." + ".".join(names[1:]) + else: + fullname = x.meaning + + elif names[0] in self.__raptor.cache.variants: + fullname = name + + else: + raise BadQuery("'%s' is not an alias or a variant" % names[0]) + + # create an evaluator for the named configuration + tmp = raptor_data.Alias("tmp") + tmp.SetProperty("meaning", fullname) + + units = tmp.GenerateBuildUnits(self.__raptor.cache) + evaluator = self.__raptor.GetEvaluator(None, units[0]) + + # get the outputpath + # this is messy as some configs construct the path inside the FLM + # rather than talking it from the XML: usually because of some + # conditional logic... but maybe some refactoring could avoid that. + releasepath = evaluator.Get("RELEASEPATH") + if not releasepath: + raise BadQuery("could not get RELEASEPATH for config '%s'" % name) + + variantplatform = evaluator.Get("VARIANTPLATFORM") + varianttype = evaluator.Get("VARIANTTYPE") + featurevariantname = evaluator.Get("FEATUREVARIANTNAME") + + platform = evaluator.Get("TRADITIONAL_PLATFORM") + + if platform == "TOOLS2": + outputpath = releasepath + else: + if not variantplatform: + raise BadQuery("could not get VARIANTPLATFORM for config '%s'" % name) + + if featurevariantname: + variantplatform += featurevariantname + + if not varianttype: + raise BadQuery("could not get VARIANTTYPE for config '%s'" % name) + + outputpath = str(generic_path.Join(releasepath, variantplatform, varianttype)) + + return Config(fullname, outputpath) + + def getproducts(self): + """extract all product variants.""" + + variants = [] + + for v in self.__raptor.cache.variants.values(): + if v.type == "product": + # copy the members we want to expose + variants.append( Product(v.name) ) + + return variants + +class BadQuery(Exception): + pass + +# end of the raptor_api module diff -r 5732243e83c1 -r 8ac72bc37dd6 sbsv2/raptor/python/raptor_cli.py --- a/sbsv2/raptor/python/raptor_cli.py Fri Apr 30 16:56:53 2010 +0100 +++ b/sbsv2/raptor/python/raptor_cli.py Tue May 04 12:11:13 2010 +0100 @@ -18,13 +18,8 @@ # by a raptor.Raptor object. # -import re import types import raptor -import os -import sys -import tempfile -from raptor_utilities import getOSPlatform from optparse import OptionParser # for parsing command line parameters @@ -132,6 +127,18 @@ parser.add_option("-q","--quiet",action="store_true",dest="quiet", help="Run quietly, not generating output messages.") +parser.add_option("--query",action="append",dest="query", + help="""Access various build settings and options using a basic API. The current options are: + + * aliases - return all the values that can be sensibly used with the sbs -c option. + + * products - return all the values that can be "." appended to an alias to specialise it for a product build. + + * config[x] - return a set of values that represent the build configuration "x". Typically "x" will be an alias name or an alias followed by "." followed by a product. + + Multiple --query options can be given. + """) + parser.add_option("-s","--sysdef",action="store",dest="sys_def_file", help="System Definition XML filename.") @@ -245,8 +252,7 @@ # parse the full set of arguments (options, leftover_args) = parser.parse_args(expanded_args) - # the leftover_args are either variable assignments of the form a=b - # or target names. + # the leftover_args are target names. for leftover in leftover_args: Raptor.AddTarget(leftover) @@ -275,6 +281,7 @@ 'noDependGenerate': Raptor.SetNoDependGenerate, 'number_of_jobs': Raptor.SetJobs, 'project_name' : Raptor.AddProject, + 'query' : Raptor.AddQuery, 'filter_list' : Raptor.FilterList, 'ignore_os_detection': Raptor.IgnoreOsDetection, 'check' : Raptor.SetCheck, diff -r 5732243e83c1 -r 8ac72bc37dd6 sbsv2/raptor/python/raptor_data.py --- a/sbsv2/raptor/python/raptor_data.py Fri Apr 30 16:56:53 2010 +0100 +++ b/sbsv2/raptor/python/raptor_data.py Tue May 04 12:11:13 2010 +0100 @@ -829,12 +829,13 @@ class Variant(Model, Config): - __slots__ = ('cache','name','host','extends','ops','variantRefs','allOperations') + __slots__ = ('cache','name','type','host','extends','ops','variantRefs','allOperations') def __init__(self, name = ""): Model.__init__(self) Config.__init__(self) self.name = name + self.type = "" # Operations defined inside this variant. self.ops = [] @@ -855,6 +856,8 @@ self.host = value elif name == "extends": self.extends = value + elif name == "type": + self.type = value else: raise InvalidPropertyError() @@ -948,6 +951,7 @@ Config.__init__(self) self.name = name self.meaning = "" + self.type = "" self.varRefs = [] self.variants = [] @@ -962,6 +966,8 @@ for u in val.split("."): self.varRefs.append( VariantRef(ref = u) ) + elif key == "type": + self.type = val else: raise InvalidPropertyError() diff -r 5732243e83c1 -r 8ac72bc37dd6 sbsv2/raptor/test/config/abiv1kit/os_properties.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/config/abiv1kit/os_properties.xml Tue May 04 12:11:13 2010 +0100 @@ -0,0 +1,15 @@ + + + + + + + + + + + + diff -r 5732243e83c1 -r 8ac72bc37dd6 sbsv2/raptor/test/config/api.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/config/api.xml Tue May 04 12:11:13 2010 +0100 @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 5732243e83c1 -r 8ac72bc37dd6 sbsv2/raptor/test/smoke_suite/dll_armv5.py --- a/sbsv2/raptor/test/smoke_suite/dll_armv5.py Fri Apr 30 16:56:53 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/dll_armv5.py Tue May 04 12:11:13 2010 +0100 @@ -1,5 +1,5 @@ # -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). # All rights reserved. # This component and the accompanying materials are made available # under the terms of the License "Eclipse Public License v1.0" @@ -19,7 +19,6 @@ def run(): t = AntiTargetSmokeTest() t.usebash = True - result = AntiTargetSmokeTest.PASS command = "sbs -b smoke_suite/test_resources/simple_dll/bld.inf -c %s -f-" maintargets = [ @@ -47,7 +46,7 @@ ] # Note that ABIv1 import libraries are only generated for RVCT-based armv5 - # builds on Windows + # builds on Windows if the kit asks for it (off by default) t.id = "0009a" t.name = "dll_armv5_rvct" @@ -56,24 +55,23 @@ t.addbuildtargets('smoke_suite/test_resources/simple_dll/bld.inf', buildtargets) t.mustmatch = mustmatch t.mustnotmatch = mustnotmatch - t.run("linux") - if t.result == AntiTargetSmokeTest.SKIP: - t.targets.extend(abiv1libtargets) - t.run("windows") - if t.result == AntiTargetSmokeTest.FAIL: - result = AntiTargetSmokeTest.FAIL + t.run() + + t.id = "0009b" + t.name = "dll_armv5_rvct_abiv1" + t.command += " --configpath=test/config/abiv1kit" + t.targets.extend(abiv1libtargets) + t.run("windows") - t.id = "0009b" + t.id = "0009c" t.name = "dll_armv5_clean" t.command = "sbs -b smoke_suite/test_resources/simple_dll/bld.inf -c armv5 clean" t.targets = [] t.mustmatch = [] t.mustnotmatch = [] t.run() - if t.result == AntiTargetSmokeTest.FAIL: - result = AntiTargetSmokeTest.FAIL - t.id = "0009c" + t.id = "0009d" t.name = "dll_armv5_gcce" t.command = command % "gcce_armv5" t.targets = maintargets @@ -82,11 +80,8 @@ t.mustmatch = mustmatch t.mustnotmatch = mustnotmatch t.run() - if t.result == AntiTargetSmokeTest.FAIL: - result = AntiTargetSmokeTest.FAIL t.id = "9" t.name = "dll_armv5" - t.result = result t.print_result() return t diff -r 5732243e83c1 -r 8ac72bc37dd6 sbsv2/raptor/test/smoke_suite/implib_armv5.py --- a/sbsv2/raptor/test/smoke_suite/implib_armv5.py Fri Apr 30 16:56:53 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/implib_armv5.py Tue May 04 12:11:13 2010 +0100 @@ -1,5 +1,5 @@ # -# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). # All rights reserved. # This component and the accompanying materials are made available # under the terms of the License "Eclipse Public License v1.0" @@ -22,7 +22,6 @@ t.name = "implib_armv5" t.command = "sbs -b smoke_suite/test_resources/simple_implib/bld.inf" \ + " -c armv5 LIBRARY" - # ABIv1 .lib files are not generated on Linux t.targets = [ "$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib.dso", "$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib{000a0000}.dso" @@ -31,13 +30,7 @@ ['simple_implib_lib/armv5/udeb/simple_implib.prep', 'simple_implib_lib/armv5/urel/simple_implib.prep'] ]) - t.run("linux") - # Run test on Windows if that is the current OS - if t.result == SmokeTest.SKIP: - t.targets.extend([ - "$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib.lib", - "$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib{000a0000}.lib" - ]) - t.run("windows") - + t.run() + + t.print_result() return t diff -r 5732243e83c1 -r 8ac72bc37dd6 sbsv2/raptor/test/smoke_suite/implib_armv5_smp.py --- a/sbsv2/raptor/test/smoke_suite/implib_armv5_smp.py Fri Apr 30 16:56:53 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/implib_armv5_smp.py Tue May 04 12:11:13 2010 +0100 @@ -27,12 +27,7 @@ "$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib.dso", "$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib{000a0000}.dso" ] - t.run("linux") - if t.result == AntiTargetSmokeTest.SKIP: - t.antitargets = [ - '$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib.lib', - '$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib{000a0000}.lib' - ] - t.run("windows") - + t.run() + + t.print_result() return t diff -r 5732243e83c1 -r 8ac72bc37dd6 sbsv2/raptor/test/smoke_suite/implib_armv5_what.py --- a/sbsv2/raptor/test/smoke_suite/implib_armv5_what.py Fri Apr 30 16:56:53 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/implib_armv5_what.py Tue May 04 12:11:13 2010 +0100 @@ -22,18 +22,11 @@ t.name = "implib_armv5_what" t.command = "sbs -b smoke_suite/test_resources/simple_implib/bld.inf -c " + \ "armv5 --what LIBRARY" - # ABIv1 .lib files are not generated on Linux t.stdout = [ '$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib.dso', '$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib{000a0000}.dso' ] - t.run("linux") - # Run test on Windows if that is the current OS - if t.result == CheckWhatSmokeTest.SKIP: - t.stdout.extend([ - '$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib.lib', - '$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib{000a0000}.lib' - ]) - t.run("windows") + t.run() + t.print_result() return t diff -r 5732243e83c1 -r 8ac72bc37dd6 sbsv2/raptor/test/smoke_suite/implib_armv5_with_armv5_smp.py --- a/sbsv2/raptor/test/smoke_suite/implib_armv5_with_armv5_smp.py Fri Apr 30 16:56:53 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/implib_armv5_with_armv5_smp.py Tue May 04 12:11:13 2010 +0100 @@ -27,12 +27,7 @@ "$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib.dso", "$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib{000a0000}.dso" ] - t.run("linux") - if t.result == SmokeTest.SKIP: - t.targets.extend([ - "$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib.lib", - "$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib{000a0000}.lib" - ]) - t.run("windows") - + t.run() + + t.print_result() return t diff -r 5732243e83c1 -r 8ac72bc37dd6 sbsv2/raptor/test/smoke_suite/implib_nodef.py --- a/sbsv2/raptor/test/smoke_suite/implib_nodef.py Fri Apr 30 16:56:53 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/implib_nodef.py Tue May 04 12:11:13 2010 +0100 @@ -28,13 +28,7 @@ "$(EPOCROOT)/epoc32/release/armv5/lib/implib_implicit_def{000a0000}.dso", "$(EPOCROOT)/epoc32/release/winscw/udeb/implib_implicit_def.lib" ] - t.run("linux") - if t.result == SmokeTest.SKIP: - t.targets.extend([ - "$(EPOCROOT)/epoc32/release/armv5/lib/implib_implicit_def.lib", - "$(EPOCROOT)/epoc32/release/armv5/lib/implib_implicit_def{000a0000}.lib" - ]) - t.run("windows") + t.run() t.id = "71b" t.name = "implib_no_def" diff -r 5732243e83c1 -r 8ac72bc37dd6 sbsv2/raptor/test/smoke_suite/implib_whatlog.py --- a/sbsv2/raptor/test/smoke_suite/implib_whatlog.py Fri Apr 30 16:56:53 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/implib_whatlog.py Tue May 04 12:11:13 2010 +0100 @@ -45,16 +45,7 @@ "$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib.dso", "$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib{000a0000}.dso" ] - t.run("linux") - if t.result == CheckWhatSmokeTest.SKIP: - t.targets.extend([ - "$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib.lib", - "$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib{000a0000}.lib" - ]) - t.stdout.extend([ - "$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib.lib", - "$(EPOCROOT)/epoc32/release/armv5/lib/simple_implib{000a0000}.lib" - ]) - t.run("windows") - + t.run() + + t.print_result() return t diff -r 5732243e83c1 -r 8ac72bc37dd6 sbsv2/raptor/test/smoke_suite/lib_versioned.py --- a/sbsv2/raptor/test/smoke_suite/lib_versioned.py Fri Apr 30 16:56:53 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/lib_versioned.py Tue May 04 12:11:13 2010 +0100 @@ -49,22 +49,7 @@ "$(EPOCROOT)/epoc32/release/winscw/udeb/versionedlib.02.lib", "$(EPOCROOT)/epoc32/release/winscw/udeb/versionedlib01.lib" ] - - if sys.platform.lower().startswith("win"): - t.targets.extend ( - [ - "$(EPOCROOT)/epoc32/release/armv5/lib/testver.lib", - "$(EPOCROOT)/epoc32/release/armv5/lib/versionedlib01.lib", - "$(EPOCROOT)/epoc32/release/armv5/lib/versioned.lib.03.lib", - "$(EPOCROOT)/epoc32/release/armv5/lib/versionedlib.02.lib", - "$(EPOCROOT)/epoc32/release/armv5/lib/testver{00020000}.lib", - "$(EPOCROOT)/epoc32/release/armv5/lib/testver{00030000}.lib", - "$(EPOCROOT)/epoc32/release/armv5/lib/versioned.lib{000a0000}.03.lib", - "$(EPOCROOT)/epoc32/release/armv5/lib/version.ed.lib.04.lib", - "$(EPOCROOT)/epoc32/release/armv5/lib/version.ed.lib{000a0000}.04.lib", - "$(EPOCROOT)/epoc32/release/armv5/lib/versionedlib01{000a0000}.lib", - "$(EPOCROOT)/epoc32/release/armv5/lib/versionedlib{000a0000}.02.lib" - ] ) - t.run() + + t.print_result() return t diff -r 5732243e83c1 -r 8ac72bc37dd6 sbsv2/raptor/test/smoke_suite/pdll_arm.py --- a/sbsv2/raptor/test/smoke_suite/pdll_arm.py Fri Apr 30 16:56:53 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/pdll_arm.py Tue May 04 12:11:13 2010 +0100 @@ -31,10 +31,6 @@ "$(EPOCROOT)/epoc32/release/%s/lib/createstaticpdll.dso", "$(EPOCROOT)/epoc32/release/%s/lib/createstaticpdll{000a0000}.dso" ] - abiv1libtargets = [ - "$(EPOCROOT)/epoc32/release/%s/lib/createstaticpdll.lib", - "$(EPOCROOT)/epoc32/release/%s/lib/createstaticpdll{000a0000}.lib" - ] buildtargets = [ "createstaticpdll_dll/%s/udeb/CreateStaticDLL.o", "createstaticpdll_dll/%s/urel/CreateStaticDLL.o" @@ -47,9 +43,6 @@ ".*ksrt.*" ] - # Note that ABIv1 import libraries are only generated for RVCT-based armv5 - # builds on Windows - t.id = "0109a" t.name = "pdll_armv5_rvct" t.command = command % "armv5" @@ -57,10 +50,7 @@ t.addbuildtargets('smoke_suite/test_resources/simple_dll/pbld.inf', map(lambda p: p % "armv5", buildtargets)) t.mustmatch = mustmatch t.mustnotmatch = mustnotmatch - t.run("linux") - if t.result == AntiTargetSmokeTest.SKIP: - t.targets.extend(map(lambda x: x % "armv5", abiv1libtargets)) - t.run("windows") + t.run() t.id = "0109b" t.name = "pdll_armv5_clean" @@ -74,7 +64,6 @@ t.name = "pdll_armv5_gcce" t.command = command % "gcce_armv5" t.targets = map(lambda p: p % "armv5", maintargets + armv5targets) - t.antitargets = map(lambda p: p % "armv5", abiv1libtargets) t.addbuildtargets('smoke_suite/test_resources/simple_dll/pbld.inf', map(lambda p: p % "armv5", buildtargets)) t.mustmatch = mustmatch t.mustnotmatch = mustnotmatch @@ -109,7 +98,6 @@ t.name = "pdll_armv7_gcce" t.command = command % "arm.v7.udeb.gcce4_3_2 -c arm.v7.urel.gcce4_3_2" t.targets = map(lambda p: p % "armv7", maintargets) - t.antitargets = map(lambda p: p % "armv7", abiv1libtargets) t.addbuildtargets('smoke_suite/test_resources/simple_dll/pbld.inf', map(lambda p: p % "armv7", buildtargets)) t.mustmatch = mustmatch t.mustnotmatch = mustnotmatch diff -r 5732243e83c1 -r 8ac72bc37dd6 sbsv2/raptor/test/smoke_suite/query_cli.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/smoke_suite/query_cli.py Tue May 04 12:11:13 2010 +0100 @@ -0,0 +1,110 @@ +# +# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of the License "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# + +import raptor_tests + +def run(): + + t = raptor_tests.SmokeTest() + t.description = "Test the --query command-line option" + + t.name = "query_cli_alias" + t.command = "sbs --query=aliases" + t.mustmatch_singleline = [ + "", + "", + "", + "", + "", + "", + "", + "" + ] + t.mustnotmatch_singleline = [ + "", + "" + ] + t.run() + + t.name = "query_cli_product" + t.command = "sbs --query=products --configpath=test/smoke_suite/test_resources/bv" + t.mustmatch_singleline = [ + "", + "", + "", + "", + "" + ] + t.mustnotmatch_singleline = [ + "", + "" + ] + t.run() + + t.name = "query_cli_config" + t.command = "sbs --query=config[armv5_urel]" + t.mustmatch_singleline = [ + "", + "fullname='arm\.v5\.urel\.rvct.*'", + "outputpath='.*/epoc32/release/armv5/urel'", + "" + ] + t.mustnotmatch_singleline = [] + t.run() + + t.name = "query_cli_config_bv" + t.command = "sbs --query=config[armv5_urel.test_bv_1] --configpath=test/smoke_suite/test_resources/bv" + t.mustmatch_singleline = [ + "", + "fullname='arm\.v5\.urel\.rvct._.\.test_bv_1'", + "outputpath='.*/epoc32/release/armv5\.one/urel'", + "" + ] + t.mustnotmatch_singleline = [] + t.run() + + t.name = "query_cli_config_others" + t.command = "sbs --query=config[winscw_urel] --query=config[tools2_rel]" + + if t.onWindows: + t2 = "tools2" + else: + t2 = raptor_tests.ReplaceEnvs("tools2/$(HOSTPLATFORM_DIR)") + + t.mustmatch_singleline = [ + "", + "outputpath='.*/epoc32/release/winscw/urel'", + "outputpath='.*/epoc32/release/%s/rel'" % t2, + "" + ] + t.mustnotmatch_singleline = [] + t.run() + + t.name = "query_cli_bad" + t.command = "sbs --query=nonsense" + t.mustmatch_singleline = [ + "", + "exception 'unknown query' with query 'nonsense'", + "" + ] + t.mustnotmatch_singleline = [] + t.errors = 1 + t.returncode = 1 + t.run() + + t.name = "query_cli" + t.print_result() + return t diff -r 5732243e83c1 -r 8ac72bc37dd6 sbsv2/raptor/test/smoke_suite/test_resources/bv/config/variants/bv_test.xml --- a/sbsv2/raptor/test/smoke_suite/test_resources/bv/config/variants/bv_test.xml Fri Apr 30 16:56:53 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/test_resources/bv/config/variants/bv_test.xml Tue May 04 12:11:13 2010 +0100 @@ -5,7 +5,7 @@ xsi:schemaLocation="http://symbian.com/xml/build build/2_0.xsd"> - + - + - +