sbsv2/raptor/test/smoke_suite/romfile.py
changeset 641 8dd670a9f34f
parent 625 a1925fb7753a
child 674 37ee82a83d43
--- a/sbsv2/raptor/test/smoke_suite/romfile.py	Mon Sep 13 13:11:19 2010 +0800
+++ b/sbsv2/raptor/test/smoke_suite/romfile.py	Mon Sep 13 14:04:04 2010 +0100
@@ -16,24 +16,27 @@
 
 
 from raptor_tests import SmokeTest
-import os
 
 def run():
 	t = SmokeTest()
 	t.description = """
 		Tests the creation and content of an .iby romfile for the armv5.test
 		configuration. Also tests for creation of relevant test batch files.
-		"""
-	t.id = "55a"
-	t.name = "romfile_general"
+		"""	
 	t.usebash = True
-	t.command = "sbs -b $(EPOCROOT)/src/ongoing/group/romfile/other_name.inf " \
-			+ "-c armv5.test ROMFILE -f - " \
-			+ "&& cat $(EPOCROOT)/epoc32/rom/src/ongoing/group/romfile/armv5test.iby"
-	
 	# Don't allow -m or -f to be appended
 	t.logfileOption = lambda :""
 	t.makefileOption = lambda :""
+	
+	t.id = "55a"
+	# Check content of iby file is correct
+	# Check batch files are generated
+	t.name = "romfile_general"
+	
+	t.command = "sbs -b $(EPOCROOT)/src/ongoing/group/romfile/other_name.inf " \
+			+ "-c armv5.test ROMFILE -m ${SBSMAKEFILE} -f ${SBSLOGFILE} " \
+			+ "&& cat $(EPOCROOT)/epoc32/rom/src/ongoing/group/romfile/armv5test.iby"
+	
 	t.targets = [
 		"$(EPOCROOT)/epoc32/rom/src/ongoing/group/romfile/armv5test.iby",
 		"$(EPOCROOT)/epoc32/data/z/test/src/armv5.auto.bat",
@@ -41,13 +44,7 @@
 		]
 
 	# Check the content of the generated .iby file.
-
 	t.mustmatch = [
-		# Check whatlog output includes batch files and .iby file
-		r".*/epoc32/rom/src/ongoing/group/romfile/armv5test.iby</build>.*",
-		r".*/epoc32/data/z/test/src/armv5.auto.bat</build>.*",
-		r".*/epoc32/data/z/test/src/armv5.manual.bat</build>.*",
-		
 		# The comment that is put at the start of the file.
 		r".*// epoc32/rom/src/ongoing/group/romfile/armv5test\.iby\n.*",
 
@@ -76,21 +73,27 @@
 		# without flagging C++ style comments.
 		r"\w//+\w"
 		]
-
-	t.run("windows")
+	t.warnings = 0 if t.onWindows else 2
+	t.run()
+	
 
-	if t.result == SmokeTest.SKIP:
-		t.command = "sbs -b $(EPOCROOT)/src/ongoing/group/romfile/other_name.inf" \
-				+ " -c armv5.test ROMFILE -f -" \
-				+ " && cat $(EPOCROOT)/epoc32/rom/src/ongoing/group/romfile/armv5test.iby"
-
-		# These two warnings are because gnumakefiles are not supported on
-		# Linux:
-		t.warnings = 2
-		t.run("linux")
+	t.id = "55b"
+	# t.targets and t.warnings are the same as above and thus omitted
+	t.name = "romfile_whatlog"
+	t.command = "sbs -b $(EPOCROOT)/src/ongoing/group/romfile/other_name.inf " \
+			+ "-c armv5.test ROMFILE -f -"
+	
+	t.mustmatch = [
+		# Check whatlog output includes batch files and .iby file
+		r".*/epoc32/rom/src/ongoing/group/romfile/armv5test.iby</build>.*",
+		r".*/epoc32/data/z/test/src/armv5.auto.bat</build>.*",
+		r".*/epoc32/data/z/test/src/armv5.manual.bat</build>.*"
+		]
+	t.mustnotmatch = []
+	t.run()
 
 
-	t.id = "55b"
+	t.id = "55c"
 	t.name = "romfile_mmp_include_twice"
 	t.command = "sbs -b $(EPOCROOT)/src/e32test/group/bld.inf " \
 	        + "-b $(EPOCROOT)/src/falcon/test/bld.inf " \
@@ -115,6 +118,7 @@
 	t.warnings = 0
 	t.run()
 
+
 	t.id = "55"
 	t.name = "romfile"
 	t.print_result()