Test fixes for whatcomp test: Deal with slashes correctly. Use Python 264. wip
authorraptorbot <raptorbot@systemstesthead.symbian.intra>
Mon, 18 Jan 2010 20:59:13 +0000
branchwip
changeset 137 befd82d9c937
parent 136 d84e89d4dde4
child 142 26f2f0b4002b
child 144 b15d9b7e12af
child 145 d3f40ec27032
Test fixes for whatcomp test: Deal with slashes correctly. Use Python 264.
sbsv2/raptor/test/run.bat
sbsv2/raptor/test/smoke_suite/whatcomp.py
--- a/sbsv2/raptor/test/run.bat	Mon Jan 18 19:33:31 2010 +0000
+++ b/sbsv2/raptor/test/run.bat	Mon Jan 18 20:59:13 2010 +0000
@@ -21,7 +21,7 @@
 
 setlocal
 set __PYTHON__=%SBS_PYTHON%
-if "%__PYTHON__%"=="" set __PYTHON__=%SBS_HOME%\win32\python252\python.exe
+if "%__PYTHON__%"=="" set __PYTHON__=%SBS_HOME%\win32\python264\python.exe
 
 set __TEST_SUITE__=%SBS_HOME%\test\common\run_tests.pyc
 set __TEST_SUITE_PY__=%SBS_HOME%\test\common\run_tests.py
--- a/sbsv2/raptor/test/smoke_suite/whatcomp.py	Mon Jan 18 19:33:31 2010 +0000
+++ b/sbsv2/raptor/test/smoke_suite/whatcomp.py	Mon Jan 18 20:59:13 2010 +0000
@@ -23,29 +23,35 @@
 	t.usebash = True
 	result = SmokeTest.PASS
 
-	abs_epocroot = os.path.abspath(os.environ["EPOCROOT"]).replace("\\","/")
+	abs_epocroot = os.path.abspath(os.environ["EPOCROOT"])
 	cwd = os.getcwd().replace("\\","/")
 
-	relative_epocroot = os.path.relpath(abs_epocroot,cwd).replace("\\","/")
+	relative_epocroot = os.path.relpath(abs_epocroot.replace("\\","/"),cwd)
 
 	
-
 	description = """This tests the whatcomp filter.  As a byproduct it uses (and thus smoke-tests) sbs_filter.py"""
 	command = "sbs -b smoke_suite/test_resources/simple/bld.inf -c %s -m ${SBSMAKEFILE} -f ${SBSLOGFILE} what  && " + \
-		  "EPOCROOT=%s sbs_filter --filters FilterWhatComp < ${SBSLOGFILE} &&" % relative_epocroot + \
-		  "EPOCROOT=%s sbs_filter --filters FilterWhatComp < ${SBSLOGFILE}"  % abs_epocroot
+		  "EPOCROOT='%s' sbs_filter --filters FilterWhatComp < ${SBSLOGFILE} &&" % relative_epocroot + \
+		  "EPOCROOT='%s' sbs_filter --filters FilterWhatComp < ${SBSLOGFILE}"  % abs_epocroot
 	targets = [
 		]	
 	buildtargets = [
 		]
-	mustmatch = [
+
+	mustmatch_pre = [
 		"-- abld -w",
-		"Chdir .*/smoke_suite/test_resources/simple",
+		".*Chdir .*/smoke_suite/test_resources/simple.*",
 		relative_epocroot + "/epoc32/release/armv5/urel/test.exe",
 		relative_epocroot + "/epoc32/release/armv5/urel/test.exe.map",
 		abs_epocroot + "/epoc32/release/armv5/urel/test.exe",
 		abs_epocroot + "/epoc32/release/armv5/urel/test.exe.map",
 	] 
+	
+	if os.sep == '\\':
+		mustmatch = [ i.replace("\\", "\\\\" ).replace("/","\\\\") for i in mustmatch_pre ]
+	else:
+		mustmatch = mustmatch_pre
+
 	mustnotmatch = [
 	"error: no (CHECK|WHAT) information found"
 	]