# HG changeset patch # User Daniel Jacobs # Date 1273756472 -3600 # Node ID 7d4971eaf8637f30e0faf8f307100f5e0ba3c589 # Parent 0d12d79bd42d251a884b39b887c5aa27f46f9197# Parent a337b022f8a84f491acb6a4be01364e0d98dd050 Merge from wip. diff -r 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/RELEASE-NOTES.html --- a/sbsv2/raptor/RELEASE-NOTES.html Thu May 13 13:53:03 2010 +0100 +++ b/sbsv2/raptor/RELEASE-NOTES.html Thu May 13 14:14:32 2010 +0100 @@ -11,6 +11,11 @@

New Features

Defect Fixes

diff -r 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/bin/sbs_filter.py --- a/sbsv2/raptor/bin/sbs_filter.py Thu May 13 13:53:03 2010 +0100 +++ b/sbsv2/raptor/bin/sbs_filter.py Thu May 13 14:14:32 2010 +0100 @@ -1,6 +1,6 @@ #!/usr/bin/python -# 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 "Symbian Foundation License v1.0" @@ -58,7 +58,7 @@ raptor_params = raptor.BuildStats(the_raptor) # Open the requested plugins using the pluginbox - the_raptor.out.open(raptor_params, the_raptor.filterList.split(','), pbox) + the_raptor.out.open(raptor_params, the_raptor.filterList, pbox) except Exception, e: sys.stderr.write("error: problem while creating filters %s\n" % str(e)) diff -r 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/examples/os_properties.xml --- a/sbsv2/raptor/examples/os_properties.xml Thu May 13 13:53:03 2010 +0100 +++ b/sbsv2/raptor/examples/os_properties.xml Thu May 13 14:14:32 2010 +0100 @@ -18,6 +18,7 @@ + diff -r 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/lib/config/arm.xml --- a/sbsv2/raptor/lib/config/arm.xml Thu May 13 13:53:03 2010 +0100 +++ b/sbsv2/raptor/lib/config/arm.xml Thu May 13 14:14:32 2010 +0100 @@ -79,7 +79,6 @@ - @@ -92,6 +91,7 @@ + @@ -103,6 +103,7 @@ + diff -r 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/lib/config/carbide.xml --- a/sbsv2/raptor/lib/config/carbide.xml Thu May 13 13:53:03 2010 +0100 +++ b/sbsv2/raptor/lib/config/carbide.xml Thu May 13 14:14:32 2010 +0100 @@ -27,6 +27,22 @@ + + + + + + + + + + + + + + + + diff -r 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/lib/config/gcc.xml --- a/sbsv2/raptor/lib/config/gcc.xml Thu May 13 13:53:03 2010 +0100 +++ b/sbsv2/raptor/lib/config/gcc.xml Thu May 13 14:14:32 2010 +0100 @@ -74,10 +74,11 @@ - + + - + @@ -85,8 +86,9 @@ - - + + + @@ -94,10 +96,11 @@ - + + - - + + diff -r 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/lib/config/make.xml --- a/sbsv2/raptor/lib/config/make.xml Thu May 13 13:53:03 2010 +0100 +++ b/sbsv2/raptor/lib/config/make.xml Thu May 13 14:14:32 2010 +0100 @@ -13,6 +13,9 @@ + + + @@ -52,7 +55,7 @@ - + @@ -60,7 +63,7 @@ - + @@ -70,12 +73,13 @@ + - + @@ -83,7 +87,7 @@ - + @@ -91,8 +95,9 @@ + - + diff -r 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/lib/config/root.xml --- a/sbsv2/raptor/lib/config/root.xml Thu May 13 13:53:03 2010 +0100 +++ b/sbsv2/raptor/lib/config/root.xml Thu May 13 14:14:32 2010 +0100 @@ -45,6 +45,7 @@ + - + @@ -142,6 +142,7 @@ + diff -r 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/lib/config/winscw.xml --- a/sbsv2/raptor/lib/config/winscw.xml Thu May 13 13:53:03 2010 +0100 +++ b/sbsv2/raptor/lib/config/winscw.xml Thu May 13 14:14:32 2010 +0100 @@ -127,7 +127,7 @@ - + @@ -135,17 +135,19 @@ - - + + + - + + - - + + diff -r 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/lib/flm/e32abiv2.flm --- a/sbsv2/raptor/lib/flm/e32abiv2.flm Thu May 13 13:53:03 2010 +0100 +++ b/sbsv2/raptor/lib/flm/e32abiv2.flm Thu May 13 14:14:32 2010 +0100 @@ -50,6 +50,11 @@ $(if $(FLMDEBUG),$(info )) +# Enable DELETE_ON_FAILED_COMPILE work around for failed RVCT 2.2 compiles +ifneq ($(DELETE_ON_FAILED_COMPILE),) +RVCT22_DELETE_WORKAROUND:=|| { $$(GNURM) $$@; exit 1; } +endif # ifneq ($(DELETE_ON_FAILED_COMPILE),) + # Strip switch-type parameters # POSTLINKTARGETTYPE:=$(strip $(POSTLINKTARGETTYPE)) @@ -167,13 +172,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)),) @@ -181,7 +185,6 @@ IMPORTLIBTARGETVERSIONED_LIB:=$(VER_E32IMPORTLIBBASE).lib endif endif - endif endif # Try to make sure that we get the right linkas name @@ -795,7 +798,7 @@ $(if $(NO_DEPEND_GENERATE),,$(DEPEND_OPTION) $(call dblquote,$(1).d)) \ $(if $(LINKERFEEDBACK_STAGE2),$(FEEDBACK_OPTION)$(call dblquote,$(FEEDBACKFILE))) \ $(if $(MULTIFILE_ENABLED),--multifile $(OUTPUT_OPTION) $(MULTIFILEOBJECT) \ - --via $$(call dblquote, $(MULTIFILE_VIAFILE)),$(OUTPUT_OPTION) $$@ $$(call dblquote, $$<)) \ + --via $$(call dblquote, $(MULTIFILE_VIAFILE)),$(OUTPUT_OPTION) $$@ $$(call dblquote, $$<)) $(if $(USE_RVCT22_DELETE_WORKAROUND),$(RVCT22_DELETE_WORKAROUND)) \ $(call endrule,compile) ifeq ($(NO_DEPEND_GENERATE),) @@ -854,7 +857,7 @@ $(if $(USERINCLUDE),$(COMPILER_SYSTEM_INCLUDE_OPTION),)$(call concat, $(COMPILER_SYSTEM_INCLUDE_OPTION),$(call dblquote,$(USERINCLUDE))) \ $(if $(SYSTEMINCLUDE),$(COMPILER_SYSTEM_INCLUDE_OPTION),)$(call concat, $(COMPILER_SYSTEM_INCLUDE_OPTION),$(call dblquote,$(SYSTEMINCLUDE))) \ $(if $(NOHIDEALL),--no_hide_all,) \ - $$(call dblquote, $$<) $(OUTPUT_OPTION) $$(@) \ + $$(call dblquote, $$<) $(OUTPUT_OPTION) $$(@) $(if $(USE_RVCT22_DELETE_WORKAROUND),$(RVCT22_DELETE_WORKAROUND)) \ $(call endrule,e32cpponly) CLEANTARGETS:=$$(CLEANTARGETS) $(CPPONLYTARGET) @@ -889,7 +892,7 @@ $(if $(SYSTEMINCLUDE),$(COMPILER_SYSTEM_INCLUDE_OPTION),)$(call concat, $(COMPILER_SYSTEM_INCLUDE_OPTION),$(call dblquote,$(SYSTEMINCLUDE))) \ $(if $(NOHIDEALL),--no_hide_all,) \ $(if $(NO_DEPEND_GENERATE),,$(DEPEND_OPTION) $(call dblquote,$(DEPENDFILENAME))) \ - $$(call dblquote, $$<) $(OUTPUT_OPTION) $$(@) \ + $$(call dblquote, $$<) $(OUTPUT_OPTION) $$(@) $(if $(USE_RVCT22_DELETE_WORKAROUND),$(RVCT22_DELETE_WORKAROUND)) \ $(call endrule,e32listing) CLEANTARGETS:=$$(CLEANTARGETS) $(LISTINGTARGET) @@ -984,7 +987,7 @@ $(call makemacrodef,-D,$(COMPILER_INTERWORK_DEFINES) $(CDEFS) $(CIADEFS)) $(CPP_LANG_OPTION) \ $(if $(USERINCLUDE),$(COMPILER_SYSTEM_INCLUDE_OPTION),)$$(call concat, $(COMPILER_SYSTEM_INCLUDE_OPTION),$$(call dblquote,$(USERINCLUDE))) \ $(if $(SYSTEMINCLUDE),$(COMPILER_SYSTEM_INCLUDE_OPTION),)$$(call concat, $(COMPILER_SYSTEM_INCLUDE_OPTION),$$(call dblquote,$(SYSTEMINCLUDE))) \ - $$(call dblquote, $$<) $(OUTPUT_OPTION) $$@ \ + $$(call dblquote, $$<) $(OUTPUT_OPTION) $$@ $(if $(USE_RVCT22_DELETE_WORKAROUND),$(RVCT22_DELETE_WORKAROUND)) \ $(call endrule,cia2cpp2o) @@ -1010,7 +1013,7 @@ $(e32abiv2_PREFILE): $1 $(PROJECT_META) $(if $(DEPENDFILE),,RESOURCE BITMAP EXPORT) $(call startrule,cia2cpp,,$1) \ $(if $(PERTURBSTARTTIME),$(RANSLEEP) $(PERTURBMSECS) ;,) \ - $(CC) $(e32abiv2_PREFILE_OPTIONS) $(OUTPUT_OPTION) $$@ $$(call dblquote,$1) \ + $(CC) $(e32abiv2_PREFILE_OPTIONS) $(OUTPUT_OPTION) $$@ $$(call dblquote,$1) $(if $(USE_RVCT22_DELETE_WORKAROUND),$(RVCT22_DELETE_WORKAROUND)) \ $(if $(NO_DEPEND_GENERATE),,&& $(CC) -M $(e32abiv2_PREFILE_OPTIONS) --depend_format=unix $(OUTPUT_OPTION) $$@ $$(call dblquote,$1) > $(call dblquote,$(e32abiv2_PREFILE).d)) \ $(call endrule,cia2cpp) @@ -1055,12 +1058,12 @@ $(if $(PERTURBSTARTTIME),$(RANSLEEP) $(PERTURBMSECS) ;,) \ $(CC) $(e32abiv2_asm_OPTIONS) \ $(if $(NO_DEPEND_GENERATE),,$(DEPEND_OPTION) $(call dblquote,$(DEPENDFILENAME))) \ - $$(call dblquote, $$<) $(OUTPUT_OPTION) $$@ \ + $$(call dblquote, $$<) $(OUTPUT_OPTION) $$@ $(if $(USE_RVCT22_DELETE_WORKAROUND),$(RVCT22_DELETE_WORKAROUND)) \ $(call endrule,asmcompile) ifeq ($(NO_DEPEND_GENERATE),) $(call startrule,asmdependencies) \ $(CC) -M $(subst --no_rtti,,$(e32abiv2_asm_OPTIONS)) --depend_format=unix \ - $(OUTPUT_OPTION) $$@ $$(call dblquote,$2) > $(call dblquote,$(DEPENDFILENAME)) \ + $(OUTPUT_OPTION) $$@ $$(call dblquote,$2) > $(call dblquote,$(DEPENDFILENAME)) $(if $(USE_RVCT22_DELETE_WORKAROUND),$(RVCT22_DELETE_WORKAROUND)) \ $(call endrule,asmdependencies) endif diff -r 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/lib/flm/globals.mk diff -r 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/lib/flm/standard.xml --- a/sbsv2/raptor/lib/flm/standard.xml Thu May 13 13:53:03 2010 +0100 +++ b/sbsv2/raptor/lib/flm/standard.xml Thu May 13 14:14:32 2010 +0100 @@ -74,6 +74,7 @@ + @@ -121,7 +122,6 @@ - @@ -178,6 +178,7 @@ + diff -r 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/notes/abiv1_implibs.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/notes/abiv1_implibs.txt Thu May 13 14:14:32 2010 +0100 @@ -0,0 +1,14 @@ + +The ABIv1 toolchain was deprecated in Symbian OS 9.4 but the build system +continued to generate both ABIv1 (.lib) import libraries and ABIv2 (.dso) +import libraries for convenience during the transition to ABIv2. + +This change now turns off the generation of ABIv1 import libraries by +default but makes support switchable on a kit-by-kit basis. To turn on +ABIv1 import library generation, add the following setting to the +root.changes variant in epoc32/sbs_config/os_properties.xml + + + +An example properties file is available in the examples/os_properties.xml +file distributed within the Raptor installation. diff -r 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/notes/delete_on_failed_compile.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/notes/delete_on_failed_compile.txt Thu May 13 14:14:32 2010 +0100 @@ -0,0 +1,7 @@ +In certain circumstances, such as failure to obtain licenses, RVCT 2.2's armcc +program still produces object files whose contents is junk. This causes build +problems later as from Make's point of view those object files are "up to +date" so the build tries to link them. Of course, these attempts at linking +fail and the build is broken. + +This is a work around for that RVCT 2.2 problem. diff -r 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/notes/parametric_log_filters.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/notes/parametric_log_filters.txt Thu May 13 14:14:32 2010 +0100 @@ -0,0 +1,31 @@ + +It is now possible to pass parameters from the command line into log filters. +This works in the same way for both sbs and sbs_filter commands. + +For example: + +sbs --filters=Foo[param1,param2,param3] + +sbs_filter --filters=Bar[value] < build.log + + +Multiple filters with parameters can be specified if needed, + +sbs --filters=Foo[param1,param2,param3],Bar[value] + + +In the 2.13.0 release there are two filters which take parameters: + +1. sbs_filter --filters=FilterComp[wizard/group] < log + +Here the parameter is (part of) a bld.inf path and the filter only prints +parts of the log which are attributable to the matching component. In the +example above, the log elements from any bld.inf which has "wizard/group" +as part of its path will be printed: normally, passing the full path name +will guarantee that only one component matches. + +2. sbs_filter --filters=FilterTagCounter[info,recipe] < log + +Here the parameters are a list of the element names to count. This is a +simple analysis filter that shows you how many instances of XMl elements +are in a log and how many characters of body text they have. \ No newline at end of file diff -r 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/notes/query_cli.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/notes/query_cli.txt Thu May 13 14:14:32 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 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/python/filter_list.py --- a/sbsv2/raptor/python/filter_list.py Thu May 13 13:53:03 2010 +0100 +++ b/sbsv2/raptor/python/filter_list.py Thu May 13 14:14:32 2010 +0100 @@ -19,6 +19,7 @@ import os import sys import raptor +import re import filter_interface import pluginbox import traceback @@ -64,8 +65,24 @@ """Nothing to do for stdout""" return True - - +def SplitList(listString): + """turn a CLI filter string into a list of (class, param) pairs. + + for example, "foo[a,b],bar[c,d]" + + becomes [ ("foo", ["a","b"]) , ("bar", ["c","d"]) ] + """ + matches = re.findall("(\w+)(\[([^\[\]]*)\])?,?", listString) + + pairs = [] + for m in matches: + classname = m[0] + if len(m[2]) > 0: + pairs.append( (classname, m[2].split(",")) ) + else: + pairs.append( (classname, []) ) + return pairs + class FilterList(filter_interface.Filter): def __init__(self): @@ -81,7 +98,6 @@ # Find all the filter plugins self.pbox = pbox possiblefilters = self.pbox.classesof(filter_interface.Filter) - filterdict = {} for p in possiblefilters: name = p.__name__.lower() @@ -89,14 +105,22 @@ raise ValueError("filters found in SBS_HOME/python/plugins which have duplicate name: %s " % p.__name__) else: filterdict[name] = p - + + # turn "filternames" into a list of (classname, parameters) pairs + filterCalls = SplitList(filternames) + + # look for each filter class in the box unfound = [] self.filters = [] - for f in filternames: - found = False + for (f, params) in filterCalls: + # if the filter exists and is a valid filter use it if f.lower() in filterdict: - self.filters.append(filterdict[f.lower()]()) + if params: + self.filters.append(filterdict[f.lower()](params)) + else: + self.filters.append(filterdict[f.lower()]()) else: + # record missing filters unfound.append(f) if unfound != []: diff -r 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/python/plugins/filter_component.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/python/plugins/filter_component.py Thu May 13 14:14:32 2010 +0100 @@ -0,0 +1,96 @@ +# +# 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: +# Filter class to print log entries for a selected component +# + +import filter_interface +import sys + +class FilterComp(filter_interface.FilterSAX): + + def __init__(self, params = []): + """parameters to this filter are the path of the bld.inf and some flags. + + The bld.inf path can be a substring of the path to match. For example, + "email" will match an element with bldinf="y:/src/email/group/bld.inf". + + No flags are supported yet; this is for future expansion. + + If no parameters are passed then nothing is printed.""" + self.bldinf = "" + self.flags = "" + + if len(params) > 0: + self.bldinf = params[0] + + if len(params) > 1: + self.flags = params[1] + + super(FilterComp, self).__init__() + + def startDocument(self): + # mark when we are inside an element with bldinf="the selected one" + self.inside = False + # and count nested elements so we can toggle off at the end. + self.nesting = 0 + + def printElementStart(self, name, attributes): + sys.stdout.write("<" + name) + for att,val in attributes.items(): + sys.stdout.write(" " + att + "='" + val + "'") + sys.stdout.write(">") + + def startElement(self, name, attributes): + if self.inside: + self.nesting += 1 + self.printElementStart(name, attributes) + return + + if self.bldinf: + try: + if self.bldinf in attributes["bldinf"]: + self.inside = True + self.nesting = 1 + self.printElementStart(name, attributes) + except KeyError: + pass + + def characters(self, char): + if self.inside: + sys.stdout.write(char) + + def endElement(self, name): + if self.inside: + sys.stdout.write("") + + self.nesting -= 1 + + if self.nesting == 0: + self.inside = False + print + + def endDocument(self): + pass + + def error(self, exception): + print filter_interface.Filter.formatError("FilterComp:" + str(exception)) + + def fatalError(self, exception): + print filter_interface.Filter.formatError("FilterComp:" + str(exception)) + + def warning(self, exception): + print filter_interface.Filter.formatWarning("FilterComp:" + str(exception)) + +# the end diff -r 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/python/plugins/filter_tagcount.py --- a/sbsv2/raptor/python/plugins/filter_tagcount.py Thu May 13 13:53:03 2010 +0100 +++ b/sbsv2/raptor/python/plugins/filter_tagcount.py Thu May 13 14:14:32 2010 +0100 @@ -19,6 +19,13 @@ class FilterTagCounter(filter_interface.FilterSAX): + def __init__(self, params = []): + """parameters to this filter are the names of tags to print. + + If no parameters are passed then all tags are reported.""" + self.interesting = params + super(FilterTagCounter, self).__init__() + def startDocument(self): # for each element name count the number of occurences # and the amount of body text contained. @@ -55,7 +62,8 @@ # report print "\nsummary:" for name,nos in sorted(self.count.items()): - print name, nos[0], nos[1] + if name in self.interesting or len(self.interesting) == 0: + print name, nos[0], nos[1] print "\nparsing:" print "errors =", self.errors diff -r 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/python/raptor.py --- a/sbsv2/raptor/python/raptor.py Thu May 13 13:53:03 2010 +0100 +++ b/sbsv2/raptor/python/raptor.py Thu May 13 14:14:32 2010 +0100 @@ -445,9 +445,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): @@ -517,7 +518,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 = [] @@ -714,6 +716,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 @@ -1060,7 +1067,7 @@ self.raptor_params = BuildStats(self) # Open the requested plugins using the pluginbox - self.out.open(self.raptor_params, self.filterList.split(','), self.pbox) + self.out.open(self.raptor_params, self.filterList, self.pbox) # log header self.out.write("\n") @@ -1222,6 +1229,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. @@ -1359,6 +1391,9 @@ # object which represents a build b = Raptor.CreateCommandlineBuild(argv) + if b.mission == Raptor.M_QUERY: + return b.Query() + return b.Build() diff -r 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/python/raptor_api.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/python/raptor_api.py Thu May 13 14:14:32 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 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/python/raptor_cli.py --- a/sbsv2/raptor/python/raptor_cli.py Thu May 13 13:53:03 2010 +0100 +++ b/sbsv2/raptor/python/raptor_cli.py Thu May 13 14:14:32 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 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/python/raptor_data.py --- a/sbsv2/raptor/python/raptor_data.py Thu May 13 13:53:03 2010 +0100 +++ b/sbsv2/raptor/python/raptor_data.py Thu May 13 14:14:32 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 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/python/raptor_make.py --- a/sbsv2/raptor/python/raptor_make.py Thu May 13 13:53:03 2010 +0100 +++ b/sbsv2/raptor/python/raptor_make.py Thu May 13 14:14:32 2010 +0100 @@ -161,6 +161,12 @@ self.talonshell = str(evaluator.Get("TALON_SHELL")) self.talontimeout = str(evaluator.Get("TALON_TIMEOUT")) self.talonretries = str(evaluator.Get("TALON_RETRIES")) + + # work around for RVCT 2.2 failed compiles + delete_on_failed_compile_s = evaluator.Get("DELETE_ON_FAILED_COMPILE") + self.delete_on_failed_compile = "" + if delete_on_failed_compile_s is not None and delete_on_failed_compile_s != "": + self.delete_on_failed_compile = "1" # commands self.initCommand = evaluator.Get("initialise") @@ -274,6 +280,7 @@ FLMHOME:=%s SHELL:=%s THIS_FILENAME:=$(firstword $(MAKEFILE_LIST)) +DELETE_ON_FAILED_COMPILE:=%s %s @@ -285,6 +292,7 @@ self.raptor.filesystem, str(self.raptor.systemFLM), self.shellpath, + self.delete_on_failed_compile, talon_settings, self.raptor.systemFLM.Append('globals.mk') ) diff -r 0d12d79bd42d -r 7d4971eaf863 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 Thu May 13 14:14:32 2010 +0100 @@ -0,0 +1,15 @@ + + + + + + + + + + + + diff -r 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/test/config/api.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/config/api.xml Thu May 13 14:14:32 2010 +0100 @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/test/smoke_suite/annofile2log.py --- a/sbsv2/raptor/test/smoke_suite/annofile2log.py Thu May 13 13:53:03 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/annofile2log.py Thu May 13 14:14:32 2010 +0100 @@ -19,7 +19,7 @@ def run(): t = SmokeTest() t.id = "43563" - t.name = "annofile2log_canned" + t.name = "annofile2log" t.description = "test workaround for log corruption from a make engine whose name begins with 'e'" t.usebash = True diff -r 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/test/smoke_suite/apply_usecases.py --- a/sbsv2/raptor/test/smoke_suite/apply_usecases.py Thu May 13 13:53:03 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/apply_usecases.py Thu May 13 14:14:32 2010 +0100 @@ -23,7 +23,7 @@ # Introduce LINKER_OPTIONS for tools2 linker t.id = "0108" - t.name = "apply_linker_options" + t.name = "apply_usecases" t.command = "sbs -b smoke_suite/test_resources/apply_usecases/linker_options/bld.inf -c tools2 -f -" t.targets = [ "$(EPOCROOT)/epoc32/release/tools2/rel/test_apply_linkeroptions.exe" diff -r 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/test/smoke_suite/clean_readonly.py --- a/sbsv2/raptor/test/smoke_suite/clean_readonly.py Thu May 13 13:53:03 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/clean_readonly.py Thu May 13 14:14:32 2010 +0100 @@ -24,7 +24,7 @@ t = AntiTargetSmokeTest() t.id = "10a" - t.name = "cleanreadonly" + t.name = "clean_readonly" t.command = "sbs -b smoke_suite/test_resources/simple_dll/bld.inf -c armv5" t.targets = [ "$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll.dll.sym", diff -r 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/test/smoke_suite/delete_on_failed_compile.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/smoke_suite/delete_on_failed_compile.py Thu May 13 14:14:32 2010 +0100 @@ -0,0 +1,109 @@ +# +# 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 os +from raptor_tests import AntiTargetSmokeTest + +def run(): + t = AntiTargetSmokeTest() + t.id = "116" + t.name = "delete_on_failed_compile" + t.description = "Test that object files are not present following a forced failed compile." + + t.usebash = True + base_command = "sbs -b smoke_suite/test_resources/simple/bld.inf -c armv5 -k" + + t.id = "116a" # Ensure everything is reallyclean before the test + t.name = "delete_on_failed_compile_reallyclean_01" + t.errors = 0 + t.returncode = 0 + t.antitargets = [ ] + t.command = base_command + " reallyclean" + t.run() + + t.id = "116b" # Object files should *not* be present after this forced failed compile + t.name = "delete_on_failed_compile_build" + t.errors = 0 + t.returncode = 1 + # None of these files should be present + t.addbuildantitargets('smoke_suite/test_resources/simple/bld.inf', + [ "test_/armv5/udeb/test.o", + "test_/armv5/udeb/test1.o", + "test_/armv5/udeb/test2.o", + "test_/armv5/udeb/test3.o", + "test_/armv5/udeb/test4.o", + "test_/armv5/udeb/test5.o", + "test_/armv5/udeb/test6.o", + "test_/armv5/urel/test.o", + "test_/armv5/urel/test1.o", + "test_/armv5/urel/test2.o", + "test_/armv5/urel/test3.o", + "test_/armv5/urel/test4.o", + "test_/armv5/urel/test5.o", + "test_/armv5/urel/test6.o" ]) + sbshome = os.environ["SBS_HOME"].replace("\\","/").rstrip("/") + t.command = base_command.replace("armv5", "armv5.fake_compiler") + \ + " --configpath=%s/test/smoke_suite/test_resources/simple/compilervariants" % sbshome + t.run() + + t.id = "116c" + t.name = "delete_on_failed_compile_reallyclean_02" + t.errors = 0 + t.returncode = 0 + t.antitargets = [] # Remove the list of anti-targets + t.command = base_command + " reallyclean" + t.run() + + t.id = "116d" # Use a redefined make_engine variant - object files *should* be present + t.name = "delete_on_failed_compile_build_redefined_make_engine" + t.errors = 0 + t.returncode = 1 + t.antitargets = [] # Remove the list of anti-targets + # All of these files should be present + t.addbuildtargets('smoke_suite/test_resources/simple/bld.inf', + [ "test_/armv5/udeb/test.o", + "test_/armv5/udeb/test1.o", + "test_/armv5/udeb/test2.o", + "test_/armv5/udeb/test3.o", + "test_/armv5/udeb/test4.o", + "test_/armv5/udeb/test5.o", + "test_/armv5/udeb/test6.o", + "test_/armv5/urel/test.o", + "test_/armv5/urel/test1.o", + "test_/armv5/urel/test2.o", + "test_/armv5/urel/test3.o", + "test_/armv5/urel/test4.o", + "test_/armv5/urel/test5.o", + "test_/armv5/urel/test6.o" ]) + + t.command = base_command.replace("armv5", "armv5.fake_compiler") + " -e make_test " \ + + " --configpath=%s/test/smoke_suite/test_resources/simple/compilervariants " % sbshome \ + + " --configpath=%s/test/smoke_suite/test_resources/simple/makevariants" % sbshome + t.run() + + t.id = "116e" + t.name = "delete_on_failed_compile_reallyclean_03" + t.errors = 0 + t.returncode = 0 + t.antitargets = [] # Remove the list of anti-targets + t.targets = [] # Remove the list of targets + t.command = base_command + " reallyclean" + t.run() + + t.id = "116" + t.name = "delete_on_failed_compile" + t.print_result() + return t diff -r 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/test/smoke_suite/dll_armv5.py --- a/sbsv2/raptor/test/smoke_suite/dll_armv5.py Thu May 13 13:53:03 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/dll_armv5.py Thu May 13 14:14:32 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 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/test/smoke_suite/filter_params.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/smoke_suite/filter_params.py Thu May 13 14:14:32 2010 +0100 @@ -0,0 +1,140 @@ +# +# 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: +# + +from raptor_tests import SmokeTest + +def run(): + + t = SmokeTest() + t.description = "Test the passing of parameters to log filters" + + command = "sbs -b smoke_suite/test_resources/simple/bld.inf -c armv5_urel --filters=" + + # no parameters means count all tags + t.name = "filter_params_all_tags" + t.command = command + "FilterTagCounter" + t.mustmatch_singleline = [ + "^info \d+ \d+", + "^whatlog \d+ \d+", + "^clean \d+ \d+" + ] + t.run() + + # empty parameter lists are valid + t.name = "filter_params_all_tags2" + t.command = command + "FilterTagCounter[]" + t.run() + + # parameters mean report only those tags + t.name = "filter_params_info" + t.command = command + "FilterTagCounter[info]" + t.mustmatch_singleline = [ + "^info \d+ \d+" + ] + t.mustnotmatch_singleline = [ + "^whatlog \d+ \d+", + "^clean \d+ \d+" + ] + t.run() + + # multiple parameters are valid + t.name = "filter_params_info_clean" + t.command = command + "FilterTagCounter[info,clean]" + t.mustmatch_singleline = [ + "^info \d+ \d+", + "^clean \d+ \d+" + ] + t.mustnotmatch_singleline = [ + "^whatlog \d+ \d+" + ] + t.run() + + # using the same filter with different parameters is valid + t.name = "filter_params_info_clean2" + t.command = command + "FilterTagCounter[info],FilterTagCounter[clean]" + t.run() + + # using the same filter with the same parameters is valid too + t.name = "filter_params_info_clean3" + t.command = command + "FilterTagCounter[info,clean],FilterTagCounter[info,clean]" + t.run() + + + # parameters must work with the sbs_filter script as well + + command = "sbs_filter --filters=%s < smoke_suite/test_resources/logexamples/filter_component.log" + t.logfileOption = lambda :"" + t.makefileOption = lambda :"" + + # should still work with no parameters + t.name = "sbs_filter_no_params" + t.command = command % "FilterComp" + t.mustmatch_singleline = [ + ] + t.mustnotmatch_singleline = [ + "[<>]" # no elements should be printed at all as no bld.inf is selected + ] + t.run() + + # should work with an empty parameter list + t.name = "sbs_filter_no_params2" + t.command = command % "FilterComp[]" + t.run() + + # with a parameter + t.name = "sbs_filter_one_param" + t.command = command % "FilterComp[email]" + t.stdout = [ + "email error #1", + "email error #2", + "email warning #1", + "email warning #2", + "", + "/epoc32/data/email_1", + "/epoc32/data/email_2", + "", + "", + "+ make_email", + "email was made fine", + "", + "", + "", + " ", + " ", + " fb email", + " ", + " ", + "" + ] + t.mustmatch_singleline = [] + t.mustnotmatch_singleline = [] + t.warnings = 2 + t.errors = 2 + t.run() + + # with multiple filters + t.name = "sbs_filter_multi" + t.command = command % "FilterComp[txt],FilterTagCounter[file,recipe]" + t.stdout = [] + t.mustmatch_singleline = [ "txt", "^file \d+", "^recipe \d+" ] + t.mustnotmatch_singleline = [ "email" ] + t.warnings = 2 + t.errors = 0 + t.run() + + t.name = "filter_params" + t.print_result() + return t diff -r 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/test/smoke_suite/implib_armv5.py --- a/sbsv2/raptor/test/smoke_suite/implib_armv5.py Thu May 13 13:53:03 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/implib_armv5.py Thu May 13 14:14:32 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 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/test/smoke_suite/implib_armv5_smp.py --- a/sbsv2/raptor/test/smoke_suite/implib_armv5_smp.py Thu May 13 13:53:03 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/implib_armv5_smp.py Thu May 13 14:14:32 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 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/test/smoke_suite/implib_armv5_what.py --- a/sbsv2/raptor/test/smoke_suite/implib_armv5_what.py Thu May 13 13:53:03 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/implib_armv5_what.py Thu May 13 14:14:32 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 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/test/smoke_suite/implib_armv5_with_armv5_smp.py --- a/sbsv2/raptor/test/smoke_suite/implib_armv5_with_armv5_smp.py Thu May 13 13:53:03 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/implib_armv5_with_armv5_smp.py Thu May 13 14:14:32 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 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/test/smoke_suite/implib_nodef.py --- a/sbsv2/raptor/test/smoke_suite/implib_nodef.py Thu May 13 13:53:03 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/implib_nodef.py Thu May 13 14:14:32 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 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/test/smoke_suite/implib_whatlog.py --- a/sbsv2/raptor/test/smoke_suite/implib_whatlog.py Thu May 13 13:53:03 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/implib_whatlog.py Thu May 13 14:14:32 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 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/test/smoke_suite/lib_versioned.py --- a/sbsv2/raptor/test/smoke_suite/lib_versioned.py Thu May 13 13:53:03 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/lib_versioned.py Thu May 13 14:14:32 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 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/test/smoke_suite/output_control.py --- a/sbsv2/raptor/test/smoke_suite/output_control.py Thu May 13 13:53:03 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/output_control.py Thu May 13 14:14:32 2010 +0100 @@ -32,7 +32,7 @@ t = SmokeTest() t.id = "82" - t.name = "output_control_sbs_build_dir" + t.name = "output_control" t.description = "Test building intermediate files into a location other than $EPOCROOT/epoc32/build. Use SBS_BUILD_DIR. environment variable." t.sbs_build_dir = environ['EPOCROOT'].replace("\\","/").rstrip("/") + '/anotherbuilddir' t.environ['SBS_BUILD_DIR'] = t.sbs_build_dir diff -r 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/test/smoke_suite/pdll_arm.py --- a/sbsv2/raptor/test/smoke_suite/pdll_arm.py Thu May 13 13:53:03 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/pdll_arm.py Thu May 13 14:14:32 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 0d12d79bd42d -r 7d4971eaf863 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 Thu May 13 14:14:32 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 0d12d79bd42d -r 7d4971eaf863 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 Thu May 13 13:53:03 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/test_resources/bv/config/variants/bv_test.xml Thu May 13 14:14:32 2010 +0100 @@ -5,7 +5,7 @@ xsi:schemaLocation="http://symbian.com/xml/build build/2_0.xsd"> - + - + - + +/epoc32/data/email_1 +/epoc32/data/email_2 + + + +/epoc32/data/txt_1 +/epoc32/data/txt_2 + + + ++ make_txt +txt was made fine + + + + ++ make_email +email was made fine + + + + + + + fb email + + + + + \ No newline at end of file diff -r 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/test/smoke_suite/test_resources/scripts/delete_on_failed_compile.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/smoke_suite/test_resources/scripts/delete_on_failed_compile.py Thu May 13 14:14:32 2010 +0100 @@ -0,0 +1,55 @@ +# +# 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: +# delete_on_failed_compile.py +# This is a test module for verifying the delete on failed compile +# work around for RVCT 2.2. It creates a dummy object file and +# exits with an error code which should result in object files being deleted. +# It takes the same arguments as armcc, but ignores them all apart from -o. +# + +import sys +import os +import re + +# Parse for -o argument. +objectfile_re = re.compile(".*-o\s(\S*\.(o|pre))\s.*", re.I) +res = objectfile_re.match(" ".join(sys.argv[1:])) + +if res: + objectpath = res.group(1) + print "Found object file %s" % objectpath + objectdirectory = os.path.dirname(objectpath) + + # Make the directory if it doesn't exist + if not os.path.isdir(objectdirectory): + try: + os.makedirs(objectdirectory) + except: + print "Not making directory %s" % objectdirectory + + # Try to write something to the .o file + try: + fh = open(objectpath, "w") + fh.write("Fake object file for delete on failed compile test\n") + fh.close() + except Exception as error: + print "Failed to created object file %s; error was: %s" % (objectfile, str(error)) +else: + print "Failed to determine object filename. Commandline used was: %s" % " ".join(sys.argv[1:]) + +# Always exit with an error +print "Exiting with non-zero exit code." +sys.exit(1) + diff -r 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/test/smoke_suite/test_resources/simple/compilervariants/delete_on_failed_compile_compiler_variants.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/smoke_suite/test_resources/simple/compilervariants/delete_on_failed_compile_compiler_variants.xml Thu May 13 14:14:32 2010 +0100 @@ -0,0 +1,8 @@ + + + + + + + + diff -r 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/test/smoke_suite/test_resources/simple/makevariants/delete_on_failed_compile_make_variants.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/smoke_suite/test_resources/simple/makevariants/delete_on_failed_compile_make_variants.xml Thu May 13 14:14:32 2010 +0100 @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/test/smoke_suite/unfrozen.py --- a/sbsv2/raptor/test/smoke_suite/unfrozen.py Thu May 13 13:53:03 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/unfrozen.py Thu May 13 14:14:32 2010 +0100 @@ -156,14 +156,7 @@ ] t.warnings = 8 # ABIv1 .lib files are not generated on Linux - t.run("linux") - if t.result == SmokeTest.SKIP: - t.targets.extend([ - "$(EPOCROOT)/epoc32/release/armv5/lib/unfrozensymbols.lib", - "$(EPOCROOT)/epoc32/release/armv5/lib/unfrozensymbols{000a0000}.lib", - "$(EPOCROOT)/epoc32/release/armv5/lib/unfrozensymbols2.lib", - "$(EPOCROOT)/epoc32/release/armv5/lib/unfrozensymbols2{000a0000}.lib" - ]) - t.run("windows") + t.run() + t.print_result() return t diff -r 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/test/smoke_suite/whatcomp.py --- a/sbsv2/raptor/test/smoke_suite/whatcomp.py Thu May 13 13:53:03 2010 +0100 +++ b/sbsv2/raptor/test/smoke_suite/whatcomp.py Thu May 13 14:14:32 2010 +0100 @@ -67,7 +67,7 @@ t.warnings = warnings t.run() - t.id = "0106a" + t.id = "0106b" t.name = "whatcomp_component_repeated" t.description = """ It is possible for what information about a component to not be grouped @@ -89,5 +89,6 @@ t.run() t.id = "0106" + t.name = "whatcomp" t.print_result() return t diff -r 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/test/unit_suite/raptor_api_unit.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbsv2/raptor/test/unit_suite/raptor_api_unit.py Thu May 13 14:14:32 2010 +0100 @@ -0,0 +1,104 @@ +# +# 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_unit module + +import generic_path +import raptor +import raptor_api +import unittest + +class TestRaptorApi(unittest.TestCase): + + def testContext(self): + api = raptor_api.Context() + + def testContextInitialiser(self): + r = raptor.Raptor() + api = raptor_api.Context(r) + + def testAliases(self): + r = raptor.Raptor() + r.cache.Load( generic_path.Join(r.home, "test", "config", "api.xml") ) + + api = raptor_api.Context(r) + + aliases = api.getaliases() # type == "" + self.failUnlessEqual(len(aliases), 4) + self.failUnlessEqual(set(["alias_A","alias_B","s1","s2"]), + set(a.name for a in aliases)) + + aliases = api.getaliases(raptor_api.ALL) # ignore type + self.failUnlessEqual(len(aliases), 6) + + aliases = api.getaliases("X") # type == "X" + self.failUnlessEqual(len(aliases), 1) + self.failUnlessEqual(aliases[0].name, "alias_D") + self.failUnlessEqual(aliases[0].meaning, "a.b.c.d") + + def testConfig(self): + r = raptor.Raptor() + r.cache.Load( generic_path.Join(r.home, "test", "config", "api.xml") ) + + api = raptor_api.Context(r) + + if r.filesystem == "unix": + path = "/home/raptor/foo/bar" + else: + path = "C:/home/raptor/foo/bar" + + config = api.getconfig("buildme") + self.failUnlessEqual(config.fullname, "buildme") + self.failUnlessEqual(config.outputpath, path) + + config = api.getconfig("buildme.foo") + self.failUnlessEqual(config.fullname, "buildme.foo") + self.failUnlessEqual(config.outputpath, path) + + config = api.getconfig("s1") + self.failUnlessEqual(config.fullname, "buildme.foo") + self.failUnlessEqual(config.outputpath, path) + + config = api.getconfig("s2.product_A") + self.failUnlessEqual(config.fullname, "buildme.foo.bar.product_A") + self.failUnlessEqual(config.outputpath, path) + + def testProducts(self): + r = raptor.Raptor() + r.cache.Load( generic_path.Join(r.home, "test", "config", "api.xml") ) + + api = raptor_api.Context(r) + + products = api.getproducts() # type == "product" + self.failUnlessEqual(len(products), 2) + self.failUnlessEqual(set(["product_A","product_C"]), + set(p.name for p in products)) + +# run all the tests + +from raptor_tests import SmokeTest + +def run(): + t = SmokeTest() + t.name = "raptor_api_unit" + + tests = unittest.makeSuite(TestRaptorApi) + result = unittest.TextTestRunner(verbosity=2).run(tests) + + if result.wasSuccessful(): + t.result = SmokeTest.PASS + else: + t.result = SmokeTest.FAIL + + return t diff -r 0d12d79bd42d -r 7d4971eaf863 sbsv2/raptor/test/unit_suite/raptor_cli_unit.py --- a/sbsv2/raptor/test/unit_suite/raptor_cli_unit.py Thu May 13 13:53:03 2010 +0100 +++ b/sbsv2/raptor/test/unit_suite/raptor_cli_unit.py Thu May 13 14:14:32 2010 +0100 @@ -153,6 +153,9 @@ def AddProject(self, project): return True + def AddQuery(self, query): + return True + def PrintVersion(self): return True