Merge in New tracecompiler support fix
authortimothy.murphy@nokia.com
Tue, 04 May 2010 17:50:27 +0100
branchfix
changeset 520 e5a5f48080cc
parent 496 50b7c0278040 (diff)
parent 519 206fd7d7ef46 (current diff)
child 521 53251dd57e58
Merge in New tracecompiler support
sbsv2/raptor/RELEASE-NOTES.html
sbsv2/raptor/test/smoke_suite/tracecompiler_whatlog.py
--- a/sbsv2/raptor/RELEASE-NOTES.html	Tue May 04 16:56:51 2010 +0100
+++ b/sbsv2/raptor/RELEASE-NOTES.html	Tue May 04 17:50:27 2010 +0100
@@ -13,9 +13,10 @@
 <li>                                           Turn OST_TRACE_COMPILER_IN_USE macro on automatically so that the TCom doesn't need to.  </a></li>
 <li><a href="notes/tcomsupport.txt">           Support new Trace Compiler commandline interface, autogen header location   </a></li>
 </ul
-
+	
 <h3>Defect Fixes</h3>
 <ul>
+<li><a href="http://developer.symbian.org/bugs/show_bug.cgi?id=2420"> SF Bug 2420 </a> - [Raptor] Output from recipes is mis-recognised as "what" output </li>
 <li><a href="http://developer.symbian.org/bugs/show_bug.cgi?id=2297"> SF Bug 2297 </a> Python exception in raptor_meta.py when processing bld.inf file </li>
 <li><a href="http://developer.symbian.org/bugs/show_bug.cgi?id=2174"> SF Bug 2174 </a> -- layer option shows errors when bld.inf missing in another layer </li>
 <li><a href="notes/tcomsupport.txt">Fix: ensure trace paths exist before build starts to avoid clashes during the build with some make engines    </a></li>
--- a/sbsv2/raptor/python/plugins/filter_what.py	Tue May 04 16:56:51 2010 +0100
+++ b/sbsv2/raptor/python/plugins/filter_what.py	Tue May 04 17:50:27 2010 +0100
@@ -90,13 +90,7 @@
 		
 		# repetitions is for tracking repeated lines in the output log
 		# when --check and --what are called
-		self.repetitions = {}
-		
-		"Regex for old what output"
-		if "win" in self.buildparameters.platform:
-			self.regex = re.compile("^[a-zA-Z]:\S+$")
-		else:
-			self.regex = re.compile("^/\S+$")
+		self.repetitions = {}	
 		
 		"Regex for targets"
 		self.target_regex = re.compile("^<(build|stringtable|resource|bitmap)>.*")
@@ -136,10 +130,6 @@
 				self.repetitions[line] = 0
 				
 			if self.repetitions[line] == 0:
-				
-				if self.regex.match(line) and (self.what or self.check):
-					"Print the whole line"
-					self.print_file(line, (-1), len(line))
 					
 				if self.target_regex.match(line):
 					"Grab the filename between <build> and </build>" 
--- a/sbsv2/raptor/test/common/raptor_tests.py	Tue May 04 16:56:51 2010 +0100
+++ b/sbsv2/raptor/test/common/raptor_tests.py	Tue May 04 17:50:27 2010 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2009-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"
@@ -603,9 +603,14 @@
 		# paths in --what output are tailored to the host OS, hence slashes are converted appropriately
 		# .whatlog output is used verbatim from the build/TEM/EM output
 		self.hostossensitive = True
+		
+		# Indicate whether output is expected to appear only once. If so, set it to True
+		self.output_expected_only_once = False 
 	
 	def posttest(self):
 		outlines = self.output.splitlines()
+		if self.output_expected_only_once:
+			outlines_left = list(outlines) 
 		
 		ok = True
 		seen = []
@@ -620,6 +625,8 @@
 				
 			if line in outlines:
 				seen.append(line)
+				if self.output_expected_only_once:
+					outlines_left.remove(line) 
 			else:
 				print "OUTPUT NOT FOUND:", line
 				ok = False
@@ -631,6 +638,13 @@
 			if not line in seen:
 				print "UNEXPECTED OUTPUT:", line
 				ok = False
+		
+		# and check for lines that we expected to see only once
+		if self.output_expected_only_once:
+			for line in outlines_left:
+				print "OUTPUT MORE THAN ONCE:", line
+				ok = False
+
 			
 		# do the base class things too
 		return (SmokeTest.posttest(self) and ok)	
--- a/sbsv2/raptor/test/smoke_suite/gnumakefile_what.py	Tue May 04 16:56:51 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/gnumakefile_what.py	Tue May 04 17:50:27 2010 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2009-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"
@@ -23,7 +23,8 @@
 	t.name = "gnumakefile_what"
 	t.command = "sbs -b smoke_suite/test_resources/gnumakefile/bld.inf --what"
 	componentpath = re.sub(r'\\','/',os.path.abspath("smoke_suite/test_resources/gnumakefile"))
-
+	
+	t.output_expected_only_once = True
 	t.stdout = [
 	# Generated txt files by the gnumakefile
 		componentpath+"/master_bld_ARMV5_UDEB.txt",
--- a/sbsv2/raptor/test/smoke_suite/temtest.py	Tue May 04 16:56:51 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/temtest.py	Tue May 04 17:50:27 2010 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# Copyright (c) 2009-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"
@@ -98,6 +98,7 @@
 	t.id = "0018f"
 	t.name = "temwhat"
 	t.command = "sbs -b smoke_suite/test_resources/simple_extension/bld.inf --what"
+	t.output_expected_only_once = True	
 	t.stdout = [
 		# exports
 		'$(EPOCROOT)/epoc32/tools/makefile_templates/sbsv2test/clean.mk',
--- a/sbsv2/raptor/test/smoke_suite/tracecompiler_whatlog.py	Tue May 04 16:56:51 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/tracecompiler_whatlog.py	Tue May 04 17:50:27 2010 +0100
@@ -60,7 +60,17 @@
 		"<build>$(EPOCROOT)/epoc32/ost_dictionaries/test_TC_0x1000008d_Dictionary.xml</build>",
 		"<build>$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/test_TC_0x1000008d_TraceDefinitions.h</build>"
 		]		
-	t.run()
+	t.run("linux")
+	if t.result == CheckWhatSmokeTest.SKIP:
+		t.targets.extend([
+			'$(EPOCROOT)/epoc32/release/armv5/lib/testTC.lib',
+			'$(EPOCROOT)/epoc32/release/armv5/lib/testTC{000a0000}.lib'
+		])
+		t.stdout.extend([
+			'<build>$(EPOCROOT)/epoc32/release/armv5/lib/testTC.lib</build>',
+			'<build>$(EPOCROOT)/epoc32/release/armv5/lib/testTC{000a0000}.lib</build>'
+		])
+		t.run("windows")
 
 	t.id = "112"