Fixing bug 1494 (tracecompiler whatlog) properly this time fix
authorIain Williamson <iain.williamson@nokia.com>
Tue, 19 Jan 2010 18:53:34 +0000
branchfix
changeset 163 c3eca3dd5925
parent 162 155415591a29
child 164 c597353e69c5
Fixing bug 1494 (tracecompiler whatlog) properly this time
sbsv2/raptor/lib/flm/e32abiv2.flm
sbsv2/raptor/lib/flm/tracecompiler.mk
sbsv2/raptor/test/common/raptor_tests.py
sbsv2/raptor/test/smoke_suite/tracecompiler_general.py
sbsv2/raptor/test/smoke_suite/tracecompiler_whatlog.py
--- a/sbsv2/raptor/lib/flm/e32abiv2.flm	Tue Jan 12 10:50:54 2010 +0000
+++ b/sbsv2/raptor/lib/flm/e32abiv2.flm	Tue Jan 19 18:53:34 2010 +0000
@@ -640,7 +640,7 @@
 # Users can turn TC on by setting it to 1 in user config.
 ifneq ($(USE_TRACE_COMPILER),)
   include $(FLMHOME)/tracecompiler.mk
-  WHATRELEASE:=$(WHAT_RELEASE) $(TRACE_DICTIONARY) $(AUTOGEN_HEADER)
+  WHATRELEASE:=$(WHATRELEASE) $(TRACE_DICTIONARY) $(AUTOGEN_HEADER)
 endif
 
 CC_CPPONLY_ARGS:=$(SYMBIAN_CCFLAGS) $(if $(DEBUG_INFO),-g) $(DEBUG_FORMAT) \
--- a/sbsv2/raptor/lib/flm/tracecompiler.mk	Tue Jan 12 10:50:54 2010 +0000
+++ b/sbsv2/raptor/lib/flm/tracecompiler.mk	Tue Jan 19 18:53:34 2010 +0000
@@ -25,8 +25,8 @@
 TRACE_PRJNAME:=$(TARGET)_$(TARGETTYPE)
 endif
 
-TRACE_DICTIONARY:=epoc32\\OST_Dictionaries\\$(TRACE_PRJNAME)_$(TC_UID)_Dictionary.xml
-AUTOGEN_HEADER:=epoc32\\include\\internal\\SymbianTraces\\autogen\\$(TRACE_PRJNAME)_$(TC_UID)_Traces.h
+TRACE_DICTIONARY:=$(EPOCROOT)/epoc32/OST_Dictionaries/$(TRACE_PRJNAME)_0x$(UID_TC)_Dictionary.xml
+AUTOGEN_HEADER:=$(EPOCROOT)/epoc32/include/internal/SymbianTraces/autogen/$(TRACE_PRJNAME)_0x$(UID_TC)_Traces.h
 
 $(if $(FLMDEBUG),$(info <debug>TRACE_PATH = $(TRACE_PATH)</debug>))
 
--- a/sbsv2/raptor/test/common/raptor_tests.py	Tue Jan 12 10:50:54 2010 +0000
+++ b/sbsv2/raptor/test/common/raptor_tests.py	Tue Jan 19 18:53:34 2010 +0000
@@ -165,8 +165,9 @@
 						except:							
 							print "\nEPOCROOT-CLEAN ERROR:"
 							print (sys.exc_type.__name__ + ":"), \
-									sys.exc_value, "\n", \
-									traceback.print_tb(sys.exc_traceback)
+									sys.exc_value
+							if sys.exc_type.__name__ == "WindowsError":
+								print traceback.print_tb(sys.exc_traceback)
 									
 			# This loop handles folders
 			for name in dirs:
--- a/sbsv2/raptor/test/smoke_suite/tracecompiler_general.py	Tue Jan 12 10:50:54 2010 +0000
+++ b/sbsv2/raptor/test/smoke_suite/tracecompiler_general.py	Tue Jan 19 18:53:34 2010 +0000
@@ -1,12 +1,27 @@
+#
+# 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"
+# 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 CheckWhatSmokeTest
+from raptor_tests import SmokeTest
 from raptor_tests import AntiTargetSmokeTest
 
 def run():
-	result = CheckWhatSmokeTest.PASS
+	result = SmokeTest.PASS
 	failed = []
 
-	t = CheckWhatSmokeTest()
+	t = SmokeTest()
 	t.description = "Testcases (ID 0101a - 0101d) test trace compiler"
 	# General test for trace compiler, which generates
 	# 1. trace headers like <source>Traces.h
@@ -49,15 +64,11 @@
 		"testtc_dll/armv5/urel/testTC{000a0000}.def",
 		"testtc_dll/tracecompile_testTC_1000008d.done"
 	])
-	t.stdout = [
-		"<build>$(EPOCROOT)/epoc32/OST_Dictionaries/testTC_0x1000008d_Dictionary.xml</build>",
-		"<build>$(EPOCROOT)/epoc32/include/internal/SymbianTraces/autogen/testTC_0x1000008d_TraceDefinitions.h</build>"
-		]		
 	# Trace compiler doesn't work on Linux for time being. Once it's fixed, will apply all 
 	# trace compiler tests to linux as well.
 	t.run("windows")
-	if t.result == CheckWhatSmokeTest.FAIL:
-		result = CheckWhatSmokeTest.FAIL
+	if t.result == SmokeTest.FAIL:
+		result = SmokeTest.FAIL
 		failed.append(t.name)
 
 	# General CLEAN test for trace compiler outputs
@@ -74,11 +85,11 @@
 		"testtc_dll/tracecompile_testTC_1000008d.done"
 	])
 	t.run("windows")
-	if t.result == CheckWhatSmokeTest.FAIL:
-		result = CheckWhatSmokeTest.FAIL
+	if t.result == SmokeTest.FAIL:
+		result = SmokeTest.FAIL
 		failed.append(t.name)
 		
-	t = CheckWhatSmokeTest()
+	t = SmokeTest()
 	t.id = "101c"
 	t.name = "TC_bv_path"
 	t.command = "sbs -b smoke_suite/test_resources/tracecompiler/TC_featurevariant/group/bld.inf -c armv5.tracecompiler" 
@@ -101,20 +112,16 @@
 		"helloworld_exe/armv5/urel/HelloWorld_urel_objects.via",
 		"helloworld_exe/tracecompile_HelloWorld_e78a5aa3.done"
 	])
-	t.stdout = [
-		"<build>$(EPOCROOT)/epoc32/OST_Dictionaries/HelloWorld_0xe78a5aa3_Dictionary.xml</build>",
-		"<build>$(EPOCROOT)/epoc32/include/internal/SymbianTraces/autogen/HelloWorld_0xe78a5aa3_TraceDefinitions.h</build>"
-		]		
 	t.run("windows")
-	if t.result == CheckWhatSmokeTest.FAIL:
-		result = CheckWhatSmokeTest.FAIL
+	if t.result == SmokeTest.FAIL:
+		result = SmokeTest.FAIL
 		failed.append(t.name)
 	
 	# 101d-101f test trace compiler auto mechanism, which is used to avoid wasting time on source 
 	# containing no osttraces.
 	# Trace compiler only runs when there are osttraces code in source. Raptor decides this by
 	# checking whether there is a "traces" or "traces_<prj_name>" folder in USERINCLUDE in a mmp file. 
-	t = CheckWhatSmokeTest()
+	t = SmokeTest()
 	t.id = "101d"
 	t.name = "TC_autorun1"
 	# Run - USERINCLUDE ../traces_autorun1
@@ -130,8 +137,8 @@
 		"test_/tracecompile_autorun1_00000001.done"
 	])
 	t.run("windows")
-	if t.result == CheckWhatSmokeTest.FAIL:
-		result = CheckWhatSmokeTest.FAIL
+	if t.result == SmokeTest.FAIL:
+		result = SmokeTest.FAIL
 		failed.append(t.name)
 	
 	t = AntiTargetSmokeTest()
@@ -154,8 +161,8 @@
 		"test_/tracecompile_autorun2_00000001.done"
 	])
 	t.run("windows")
-	if t.result == CheckWhatSmokeTest.FAIL:
-		result = CheckWhatSmokeTest.FAIL
+	if t.result == SmokeTest.FAIL:
+		result = SmokeTest.FAIL
 		failed.append(t.name)
 
 	t = AntiTargetSmokeTest()
@@ -178,8 +185,8 @@
 		"test_/tracecompile_autorun3_00000001.done"
 	])
 	t.run("windows")
-	if t.result == CheckWhatSmokeTest.FAIL:
-		result = CheckWhatSmokeTest.FAIL
+	if t.result == SmokeTest.FAIL:
+		result = SmokeTest.FAIL
 		failed.append(t.name)
 
 	# Test trace compiler doesn't run when it is switched off
@@ -202,16 +209,16 @@
 		"test_/tracecompile_autorun1_00000001.done"
 	])
 	t.run("windows")
-	if t.result == CheckWhatSmokeTest.FAIL:
-		result = CheckWhatSmokeTest.FAIL
+	if t.result == SmokeTest.FAIL:
+		result = SmokeTest.FAIL
 		failed.append(t.name)
 	
 
-	t.name = "traceccompiler_general"
+	t.name = "tracecompiler_general"
 	t.result = result
 
 	print "\nOverall Result : " + result.upper() + "\n"
-	if result == CheckWhatSmokeTest.FAIL:
+	if result == SmokeTest.FAIL:
 		print len(failed), "tests failed:"
 		for x in failed:
 			print x
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sbsv2/raptor/test/smoke_suite/tracecompiler_whatlog.py	Tue Jan 19 18:53:34 2010 +0000
@@ -0,0 +1,62 @@
+#
+# 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 CheckWhatSmokeTest,AntiTargetSmokeTest
+import re
+
+def run():
+	t = CheckWhatSmokeTest()
+	t.description = "Trace Compiler Whatlog test"
+	t.id = "xxx"
+	t.name = "tracecompiler_whatlog"
+	t.usebash = True
+	t.command = "sbs -b smoke_suite/test_resources/tracecompiler/testTC/group/bld.inf -c armv5.tracecompiler -m ${SBSMAKEFILE} -f ${SBSLOGFILE} && cat ${SBSLOGFILE}"
+	t.hostossensitive = False
+	t.regexlinefilter = re.compile("^<(whatlog|export|build>|resource>|bitmap>)")
+	t.targets = [
+		"$(EPOCROOT)/epoc32/release/armv5/lib/testTC.dso",
+		"$(EPOCROOT)/epoc32/release/armv5/lib/testTC{000a0000}.dso",
+		"$(EPOCROOT)/epoc32/release/armv5/lib/testTC{000a0000}.lib",
+		"$(EPOCROOT)/epoc32/release/armv5/lib/testTC.lib",
+		"$(EPOCROOT)/epoc32/release/armv5/udeb/testTC.dll",
+		"$(EPOCROOT)/epoc32/release/armv5/udeb/testTC.dll.map",
+		"$(EPOCROOT)/epoc32/release/armv5/urel/testTC.dll",
+		"$(EPOCROOT)/epoc32/release/armv5/urel/testTC.dll.map",
+		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/wlanhwinitTraces.h",
+		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/wlanhwinitmainTraces.h",
+		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/wlanhwinitpermparserTraces.h",	
+		"$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/fixed_id.definitions",
+		"$(EPOCROOT)/epoc32/ost_dictionaries/testTC_0x1000008d_Dictionary.xml",
+		"$(EPOCROOT)/epoc32/include/internal/symbiantraces/autogen/testTC_0x1000008d_TraceDefinitions.h"
+		]
+	t.stdout = [
+		"<whatlog bldinf='I:/team/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/testTC/group/bld.inf' mmp='I:/team/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/testTC/group/testTC.mmp' config='armv5_urel.tracecompiler'>",
+		"<whatlog bldinf='I:/team/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/testTC/group/bld.inf' mmp='I:/team/sbsv2/raptor/test/smoke_suite/test_resources/tracecompiler/testTC/group/testTC.mmp' config='armv5_udeb.tracecompiler'>",
+		"<build>$(EPOCROOT)/epoc32/release/armv5/lib/testTC.dso</build>",
+		"<build>$(EPOCROOT)/epoc32/release/armv5/lib/testTC{000a0000}.dso</build>",
+		"<build>$(EPOCROOT)/epoc32/release/armv5/lib/testTC{000a0000}.lib</build>",
+		"<build>$(EPOCROOT)/epoc32/release/armv5/lib/testTC.lib</build>",
+		"<build>$(EPOCROOT)/epoc32/release/armv5/udeb/testTC.dll</build>",
+		"<build>$(EPOCROOT)/epoc32/release/armv5/udeb/testTC.dll.map</build>",
+		"<build>$(EPOCROOT)/epoc32/release/armv5/urel/testTC.dll</build>",
+		"<build>$(EPOCROOT)/epoc32/release/armv5/urel/testTC.dll.map</build>",
+		"<build>$(EPOCROOT)/epoc32/ost_dictionaries/testTC_0x1000008d_Dictionary.xml</build>",
+		"<build>$(EPOCROOT)/epoc32/include/internal/SymbianTraces/autogen/testTC_0x1000008d_TraceDefinitions.h</build>"
+		]		
+	t.run("windows")
+
+	return t
+