merge 2.13.0 (candidate 2) from default wip
authorJon Chatten
Wed, 07 Apr 2010 12:34:10 +0100
branchwip
changeset 457 9bebdb95e0de
parent 455 6cc6d1d59188 (diff)
parent 427 d8edd94cd8e2 (current diff)
child 461 0c5ca7f6d8ae
merge 2.13.0 (candidate 2) from default
sbsv2/raptor/RELEASE-NOTES.html
sbsv2/raptor/lib/config/rvct.xml
sbsv2/raptor/lib/config/variants.xml
sbsv2/raptor/lib/flm/e32abiv2.flm
sbsv2/raptor/python/raptor.py
sbsv2/raptor/python/raptor_make.py
sbsv2/raptor/test/smoke_suite/annofile2log.py
--- a/sbsv2/raptor/RELEASE-NOTES.html	Wed Mar 31 17:11:36 2010 +0100
+++ b/sbsv2/raptor/RELEASE-NOTES.html	Wed Apr 07 12:34:10 2010 +0100
@@ -6,6 +6,17 @@
 
 <h1>Release Notes for Symbian Build System v2</h1>
 
+<h2>next version</h2>
+
+<h3> New Features</h3>
+<ul>
+
+<li><a href="notes/parametric_log_filters.txt">   Pass parameters to log filters from the command line </a></li>
+<li><a href="notes/delete_on_failed_compile.txt"> Work-around for failed RVCT 2.2 compiles             </a></li>
+
+</ul>
+
+
 <h2>version 2.13.0</h2>
 
 <h3>New Features</h3>
--- a/sbsv2/raptor/bin/sbs_filter.py	Wed Mar 31 17:11:36 2010 +0100
+++ b/sbsv2/raptor/bin/sbs_filter.py	Wed Apr 07 12:34:10 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))
--- a/sbsv2/raptor/lib/config/make.xml	Wed Mar 31 17:11:36 2010 +0100
+++ b/sbsv2/raptor/lib/config/make.xml	Wed Apr 07 12:34:10 2010 +0100
@@ -13,6 +13,9 @@
 		<set name='TALON_TIMEOUT' value='600000'/>
 		<set name='TALON_DESCRAMBLE' value='1'/>
 		
+		<!-- Work around for RVCT compile failures -->
+		<set name='DELETE_ON_FAILED_COMPILE' value='1'/>
+		
 		<!-- Command-line for initialisation -->
 		<set name="initialise" value=""/>
 
@@ -70,6 +73,7 @@
 		<set name="build" value="$(EMAKE) HAVE_ORDERONLY= -r"/>
 		<set name="scrambled" value="false"/>
 		<set name='TALON_DESCRAMBLE' value=''/>
+		<set name='DELETE_ON_FAILED_COMPILE' value=''/>
 
 		<!-- workaround for damaged log output from emake -->
 		<set name="copylogfromannofile" value="true"/>
@@ -91,6 +95,7 @@
 		<set name="build" value="$(PVMGMAKE) HAVE_ORDERONLY=true  -r"/>
 		<set name="scrambled" value="false" />
 		<set name='TALON_DESCRAMBLE' value=''/>
+		<set name='DELETE_ON_FAILED_COMPILE' value=''/>
 	</var>
 
 	<alias name="pvmgmake" meaning="pvmgmake_engine"/>
--- a/sbsv2/raptor/lib/config/rvct.xml	Wed Mar 31 17:11:36 2010 +0100
+++ b/sbsv2/raptor/lib/config/rvct.xml	Wed Apr 07 12:34:10 2010 +0100
@@ -101,6 +101,7 @@
 		<set name="UNDEFINED_SYMBOL_REF_OPTION" value=""/>
 		<set name="UNIX_SLASH_FOR_CC_ABS_PATHS" value="0"/>
 		<set name="UNRESOLVED_SYMBOL_REF_OPTION" value=""/>
+		<set name="USE_RVCT22_DELETE_WORKAROUND" value=""/>
 		<set name="USERINCLUDE" value=""/>
 		<set name="USER_LIBS_PATH_OPTION" value="--userlibpath"/>
 		<set name="VFE_OPTION" value="--no_vfe"/>
--- a/sbsv2/raptor/lib/config/variants.xml	Wed Mar 31 17:11:36 2010 +0100
+++ b/sbsv2/raptor/lib/config/variants.xml	Wed Apr 07 12:34:10 2010 +0100
@@ -142,6 +142,7 @@
 		<set name="PL.SOFTVFP_MAYBE_VFPV2" value="softvfp"/>
 		<set name="CC.ARMV5" value="--cpu 5T"/>
 		<set name="CC.ARMV6" value="--cpu 6"/>
+		<set name="USE_RVCT22_DELETE_WORKAROUND" value="1" />
 	</var>
 
 	<var name="rvct3_1" extends="rvct">
--- a/sbsv2/raptor/lib/flm/e32abiv2.flm	Wed Mar 31 17:11:36 2010 +0100
+++ b/sbsv2/raptor/lib/flm/e32abiv2.flm	Wed Apr 07 12:34:10 2010 +0100
@@ -50,6 +50,11 @@
 
 $(if $(FLMDEBUG),$(info <flm name='e32abiv2' target='$(TARGET)' type='$(TARGETTYPE)' outputpath='$(OUTPUTPATH)' metasource='$(METASOURCE)' postlinkfiletype='$(POSTLINKFILETYPE)' />))
 
+# 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))
@@ -792,7 +797,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),)
@@ -851,7 +856,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)
@@ -886,7 +891,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)
@@ -981,7 +986,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)
 
 
@@ -1007,7 +1012,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)
 
@@ -1052,12 +1057,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
 
--- a/sbsv2/raptor/lib/flm/standard.xml	Wed Mar 31 17:11:36 2010 +0100
+++ b/sbsv2/raptor/lib/flm/standard.xml	Wed Apr 07 12:34:10 2010 +0100
@@ -74,6 +74,7 @@
 		<param name='CC.VAL.SOFTVFP_MAYBE_VFPV2' default=''/>
 		<param name='CODE_SEGMENT_START' default=''/>
 		<param name='TOOLCHAIN' default=''/>
+		<param name='USE_RVCT22_DELETE_WORKAROUND' default=''/>
 	</interface>
 	<interface name="Symbian.e32abiv2" extends="Symbian.mmp" flm="e32abiv2.flm">
 		<param name='SUPPORTS_STDCPP_NEWLIB' default='1'/>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/notes/delete_on_failed_compile.txt	Wed Apr 07 12:34:10 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.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/notes/parametric_log_filters.txt	Wed Apr 07 12:34:10 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
--- a/sbsv2/raptor/python/filter_list.py	Wed Mar 31 17:11:36 2010 +0100
+++ b/sbsv2/raptor/python/filter_list.py	Wed Apr 07 12:34:10 2010 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2008-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,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,13 +98,19 @@
 		# Find all the filter plugins
 		self.pbox = pbox
 		possiblefilters = self.pbox.classesof(filter_interface.Filter)
+		# 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:
+		for (f, params) in filterCalls:
 			unfound.append(f) # unfound unless we find it
 			for pl in possiblefilters:
 				if pl.__name__.upper() == f.upper():
-					self.filters.append(pl())
+					if params:
+						self.filters.append(pl(params))
+					else:
+						self.filters.append(pl())
 					unfound = unfound[:-1]
 		if unfound != []:
 			raise ValueError("requested filters not found: %s \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/python/plugins/filter_component.py	Wed Apr 07 12:34:10 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("</" + name + ">")
+			
+		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
--- a/sbsv2/raptor/python/plugins/filter_tagcount.py	Wed Mar 31 17:11:36 2010 +0100
+++ b/sbsv2/raptor/python/plugins/filter_tagcount.py	Wed Apr 07 12:34:10 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
--- a/sbsv2/raptor/python/raptor.py	Wed Mar 31 17:11:36 2010 +0100
+++ b/sbsv2/raptor/python/raptor.py	Wed Apr 07 12:34:10 2010 +0100
@@ -1057,7 +1057,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("<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\n")
--- a/sbsv2/raptor/python/raptor_make.py	Wed Mar 31 17:11:36 2010 +0100
+++ b/sbsv2/raptor/python/raptor_make.py	Wed Apr 07 12:34:10 2010 +0100
@@ -158,6 +158,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")
@@ -271,6 +277,7 @@
 FLMHOME:=%s
 SHELL:=%s
 THIS_FILENAME:=$(firstword $(MAKEFILE_LIST))
+DELETE_ON_FAILED_COMPILE:=%s 
 
 %s
 
@@ -282,6 +289,7 @@
 			 self.raptor.filesystem,
 			 str(self.raptor.systemFLM),
 			 self.shellpath,
+			 self.delete_on_failed_compile,
 			 talon_settings,
 			 self.raptor.systemFLM.Append('globals.mk') )
 
--- a/sbsv2/raptor/test/smoke_suite/annofile2log.py	Wed Mar 31 17:11:36 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/annofile2log.py	Wed Apr 07 12:34:10 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
--- a/sbsv2/raptor/test/smoke_suite/apply_usecases.py	Wed Mar 31 17:11:36 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/apply_usecases.py	Wed Apr 07 12:34:10 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"
--- a/sbsv2/raptor/test/smoke_suite/clean_readonly.py	Wed Mar 31 17:11:36 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/clean_readonly.py	Wed Apr 07 12:34:10 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",
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/delete_on_failed_compile.py	Wed Apr 07 12:34:10 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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/filter_params.py	Wed Apr 07 12:34:10 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 = [
+		"<error bldinf='y:/src/email/bld.inf'>email error #1</error>",
+		"<error bldinf='y:/src/email/bld.inf'>email error #2</error>",
+		"<warning bldinf='y:/src/email/bld.inf'>email warning #1</warning>",
+		"<warning bldinf='y:/src/email/bld.inf'>email warning #2</warning>",
+		"<whatlog bldinf='y:/src/email/bld.inf' config='armv5_urel' mmp='y:/src/email/a.mmp'>",
+		"<build>/epoc32/data/email_1</build>",
+		"<build>/epoc32/data/email_2</build>",
+		"</whatlog>",
+		"<recipe bldinf='y:/src/email/bld.inf' name='dummy'>",
+		"+ make_email",
+		"email was made fine",
+		"<status exit='ok'></status>",
+		"</recipe>",
+		"<fake bldinf='y:src/email/bld.inf'>",
+		"  <foo>",
+		"   <bar>",
+		"     <fb>fb email</fb>",
+		"   </bar>",
+		" </foo>",
+		"</fake>"
+		]
+	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
--- a/sbsv2/raptor/test/smoke_suite/output_control.py	Wed Mar 31 17:11:36 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/output_control.py	Wed Apr 07 12:34:10 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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/logexamples/filter_component.log	Wed Apr 07 12:34:10 2010 +0100
@@ -0,0 +1,42 @@
+<buildlog>
+
+<error bldinf="y:/src/email/bld.inf">email error #1</error>
+<error bldinf="y:/src/email/bld.inf">email error #2</error>
+
+<warning bldinf="y:/src/txt/bld.inf">txt warning #1</warning>
+<warning bldinf="y:/src/txt/bld.inf">txt warning #2</warning>
+
+<warning bldinf="y:/src/email/bld.inf">email warning #1</warning>
+<warning bldinf="y:/src/email/bld.inf">email warning #2</warning>
+
+<whatlog bldinf='y:/src/email/bld.inf' mmp='y:/src/email/a.mmp' config='armv5_urel'>
+<build>/epoc32/data/email_1</build>
+<build>/epoc32/data/email_2</build>
+</whatlog>
+
+<clean bldinf='y:/src/txt/bld.inf' mmp='y:/src/txt/b.mmp' config='armv5_udeb'>
+<file>/epoc32/data/txt_1</file>
+<file>/epoc32/data/txt_2</file>
+</clean>
+
+<recipe name='dummy' bldinf='y:/src/txt/bld.inf'>
++ make_txt
+txt was made fine
+<status exit='ok'/>
+</recipe>
+
+<recipe name='dummy' bldinf='y:/src/email/bld.inf'>
++ make_email
+email was made fine
+<status exit='ok'/>
+</recipe>
+
+<fake bldinf='y:src/email/bld.inf'>
+  <foo>
+    <bar>
+      <fb>fb email</fb>
+    </bar>
+  </foo>
+</fake>
+
+</buildlog>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/scripts/delete_on_failed_compile.py	Wed Apr 07 12:34:10 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)
+
--- /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	Wed Apr 07 12:34:10 2010 +0100
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<build xmlns="http://symbian.com/xml/build" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symbian.com/xml/build ../../schema/build/2_0.xsd">
+	<!-- Fake compiler variant for testing the  -->	
+	<var name="fake_compiler">
+		<set name='CC' value='python -u $(SBS_HOME)/test/smoke_suite/test_resources/scripts/delete_on_failed_compile.py'/>
+	</var>
+
+</build>
--- /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	Wed Apr 07 12:34:10 2010 +0100
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<build xmlns="http://symbian.com/xml/build" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symbian.com/xml/build ../../schema/build/2_0.xsd">
+	<!-- Some make engines for test purposes -->
+	
+	<!-- Raptor make engine for GNU make -->
+	<var name="make_engine">
+		<varRef ref="default.locations"/>
+
+		<!-- Shell settings -->
+		<set name='DEFAULT_SHELL' value='$(SBS_HOME)/$(HOSTPLATFORM_DIR)/bin/talon$(DOTEXE)' type='tool'/>
+		<set name='TALON_SHELL' value='$(SBS_SHELL)' type='tool'/>
+		<set name='USE_TALON' value='1'/>
+		<set name='TALON_TIMEOUT' value='600000'/>
+		<set name='TALON_DESCRAMBLE' value='1'/>
+		
+		<!-- Command-line for initialisation -->
+		<set name="initialise" value=""/>
+
+		<!-- Command-line for shutdown -->
+		<set name="shutdown" value=""/>
+
+		<!-- Command-line for build  -->
+		<set name="build" value="$(GNUMAKE38) HAVE_ORDERONLY=1 -r" type="tool"/>
+
+		<!-- Options  -->
+		<set name="makefile" value="-f"/>
+		<set name="keep_going" value="-k"/>
+		<set name="jobs" value="-j"/>
+		
+		<!-- The following are stuck on the commandline before any options
+		     specified by the sbs "mo" option, so they can be overridden -->
+		<set name="defaultoptions" value=""/>
+
+		<!-- How to split out the makefiles -->
+		<set name="selectors" value="export,bitmap,resource_deps,resource,default"/>
+		<set name="export.selector.iface" value="\.export$"/>
+		<set name="export.selector.target" value="EXPORT"/>
+		<set name="bitmap.selector.iface" value="\.(bitmap|extension|mifconv)$"/>
+		<set name="bitmap.selector.target" value="BITMAP"/>
+		<set name="resource_deps.selector.iface" value="\.resource$"/>
+		<set name="resource_deps.selector.target" value="RESOURCE_DEPS"/>
+		<set name="resource_deps.selector.ignoretargets" value="^(RESOURCE|CLEAN|CLEANEXPORT|REALLYCLEAN)$"/>
+		<set name="resource.selector.iface" value="\.(resource|extension|mif2cdlindex|nativejava)$"/>
+		<set name="resource.selector.target" value="RESOURCE"/>
+		<set name="default.selector.iface" value="\.(?!export$|bitmap$|resource$|mifconv$|mif2cdlindex$|nativejava$).*$"/>
+		<set name="default.selector.target" value="ALL"/>
+
+		<!-- is the text output with -j buffered or scrambled? -->
+		<set name="scrambled" value="true"/>
+	</var>
+	
+	<alias name="make_test" meaning="make_engine"/>
+
+	<!-- use the talon shell -->
+	<var name="make_no_talon_engine_test" extends="make_engine_test">
+	        <set name='DEFAULT_SHELL' value='$(SBS_SHELL)' type='tool'/>
+	        <set name='USE_TALON' value=''/>
+	</var>
+</build>
+
--- a/sbsv2/raptor/test/smoke_suite/whatcomp.py	Wed Mar 31 17:11:36 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/whatcomp.py	Wed Apr 07 12:34:10 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