Changes to delete on failed compile test. wip
authorDaniel Jacobs <daniel.jacobs@nokia.com>
Tue, 30 Mar 2010 14:22:55 +0100
branchwip
changeset 444 31c715210447
parent 443 2f5cedd04db9
child 445 28f0ff4c401c
Changes to delete on failed compile test.
sbsv2/raptor/test/smoke_suite/delete_on_failed_compile.py
sbsv2/raptor/test/smoke_suite/test_resources/simple/makevariants/delete_on_failed_compile_make_variants.xml
--- a/sbsv2/raptor/test/smoke_suite/delete_on_failed_compile.py	Mon Mar 29 14:20:00 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/delete_on_failed_compile.py	Tue Mar 30 14:22:55 2010 +0100
@@ -17,24 +17,7 @@
 import os
 from raptor_tests import AntiTargetSmokeTest
 
-def setEnvVar(envvarname, newvalue):
-	""" If the environment variable envvarname exists in the environment, set it to newvalue 
-	and return the original value of envvarname. If envvarname does not exist, return None. """
-	
-	oldvalue = None
-	
-	if envvarname in os.environ:
-		oldvalue = os.environ[envvarname]
-		os.environ[envvarname] = newvalue
-	
-	return oldvalue
-		
-
 def run():
-	# Set the ARM license file environment variables to junk files to ensure failed compiles.
-	saved_armlmd_license_file = setEnvVar("ARMLMD_LICENSE_FILE", "123@456")
-	saved_lm_license_file = setEnvVar("LM_LICENSE_FILE", "123@456")
-	
 	t = AntiTargetSmokeTest()
 	t.id = "116"
 	t.name = "delete_on_failed_compile"
@@ -47,13 +30,13 @@
 	t.name = "delete_on_failed_compile_reallyclean_01"
 	t.errors = 0
 	t.returncode = 0
-	t.antitargets = [ "" ]
+	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 = 1
+	t.errors = 0
 	t.returncode = 1
 	# None of these files should be present
 	t.addbuildantitargets('smoke_suite/test_resources/simple/bld.inf', 
@@ -71,56 +54,19 @@
 			"test_/armv5/urel/test4.o",
 			"test_/armv5/urel/test5.o",
 			"test_/armv5/urel/test6.o"  ])
-	t.command = base_command
+	sbshome = os.environ["SBS_HOME"].replace("\\","/").rstrip("/")
+	t.command = base_command.replace("armv5", "armv5.fake_compiler") + " --configpath=%s/test/smoke_suite/test_resources/simple/makevariants" % sbshome
 	t.run()
 	
 	t.id = "116c"
-	t.name = "delete_on_error_reallyclean_02"
+	t.name = "delete_on_failed_compile_reallyclean_02"
 	t.errors = 0
 	t.returncode = 0
-	t.self.antitargets = [] # Remove the list of anti-targets
+	t.antitargets = [] # Remove the list of anti-targets
 	t.command = base_command + " reallyclean"
 	t.run()
 	
-	t.id = "116d"  # In this step, the object files should be there, but their contents will be invalid
-	t.name = "delete_on_error_custom_make_engine"
-	sbshome = os.environ["SBS_HOME"].replace("\\","/").rstrip("/")
-	t.errors = 0
-	t.returncode = 0
-	t.mustmatch_singleline = []
-	t.command = base_command + " -e make_test --configpath=%s/test/smoke_suite/test_resources/simple/makevariants" % sbshome 
-	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.run()
-	
-	t.id = "116e"
-	t.name = "delete_on_error_reallyclean_03"
-	t.errors = 0
-	t.returncode = 0
-	t.self.targets = [] # Remove the list of targets
-	t.command = base_command + " reallyclean"
-	t.run()
-	
-	# Restore the license file environment variables, provided they existed.
-	if saved_armlmd_license_file != None:
-		saved_armlmd_license_file = setEnvVar("ARMLMD_LICENSE_FILE", saved_armlmd_license_file)
-	if saved_lm_license_file != None:
-		saved_lm_license_file = setEnvVar("LM_LICENSE_FILE", saved_lm_license_file)
-	
 	t.id = "116"
-	t.name = ""
+	t.name = "delete_on_failed_compile"
 	t.print_result()
 	return t
--- a/sbsv2/raptor/test/smoke_suite/test_resources/simple/makevariants/delete_on_failed_compile_make_variants.xml	Mon Mar 29 14:20:00 2010 +0100
+++ b/sbsv2/raptor/test/smoke_suite/test_resources/simple/makevariants/delete_on_failed_compile_make_variants.xml	Tue Mar 30 14:22:55 2010 +0100
@@ -57,5 +57,8 @@
 	        <set name='USE_TALON' value=''/>
 	</var>
 
+	<var name="fake_compiler">
+	        <set name='CC' value='fake_compiler'/>
+	</var>
 
 </build>