Update tests to deal with tools2 Linux build differences.
--- a/sbsv2/raptor/test/smoke_suite/dependencies.py Mon Feb 01 15:30:46 2010 +0000
+++ b/sbsv2/raptor/test/smoke_suite/dependencies.py Tue Feb 02 16:48:14 2010 +0000
@@ -21,7 +21,7 @@
t = AntiTargetSmokeTest()
t.usebash = True
- targets = [
+ genericTargets = [
"$(EPOCROOT)/epoc32/release/armv5/udeb/dependency.exe",
"$(EPOCROOT)/epoc32/release/armv5/udeb/dependency.exe.map",
"$(EPOCROOT)/epoc32/release/armv5/urel/dependency.exe",
@@ -29,8 +29,6 @@
"$(EPOCROOT)/epoc32/release/winscw/urel/dependency.exe",
"$(EPOCROOT)/epoc32/release/winscw/urel/dependency.exe.map",
"$(EPOCROOT)/epoc32/release/winscw/udeb/dependency.exe",
- "$(EPOCROOT)/epoc32/release/tools2/rel/dependency.exe",
- "$(EPOCROOT)/epoc32/tools/dependency.exe",
"$(EPOCROOT)/epoc32/include/dependency.rsg",
"$(EPOCROOT)/epoc32/data/z/resource/apps/dependency.rsc",
"$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/dependency.rsc",
@@ -40,6 +38,19 @@
"$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/main.rsc",
"$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/main.rsc"
]
+ windowsTargets = [
+ "$(EPOCROOT)/epoc32/release/tools2/rel/dependency.exe",
+ "$(EPOCROOT)/epoc32/tools/dependency.exe"
+ ]
+ linuxTargets = [
+ "$(EPOCROOT)/epoc32/release/tools2/$(HOSTPLATFORM_DIR)/rel/dependency",
+ "$(EPOCROOT)/epoc32/tools/dependency"
+ ]
+
+ # Set general host platform specifics from first test run, but assume Windows initially
+ hostPlatform = "windows"
+ hostPlatformTargets = genericTargets + windowsTargets
+ hostPlatformOffset = ""
t.id = "0098a"
t.name = "baseline_build"
@@ -48,11 +59,17 @@
cp smoke_suite/test_resources/dependencies/src/dependency1.cpp smoke_suite/test_resources/dependencies/dependency.cpp
cp smoke_suite/test_resources/dependencies/src/dependency1.rss smoke_suite/test_resources/dependencies/dependency.rss
sbs -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel"""
- t.targets = targets
t.mustnotmatch = [
"<warning>Missing dependency detected: .*</warning>"
]
- t.run()
+ t.targets = hostPlatformTargets
+ t.run(hostPlatform)
+ if t.result == AntiTargetSmokeTest.SKIP:
+ hostPlatform = "linux"
+ hostPlatformTargets = genericTargets + linuxTargets
+ hostPlatformOffset = "$(HOSTPLATFORM_DIR)/"
+ t.targets = hostPlatformTargets
+ t.run(hostPlatform)
# Ensure we don't clean up from the previous build in the following two tests
t.targets = []
@@ -70,6 +87,7 @@
[".*recipe name='compile2object'", 1],
[".*recipe name='resourcecompile'", 1]
]
+
t.id = "0098b"
t.name ="touched_header_dependencies"
@@ -80,6 +98,7 @@
touch $(EPOCROOT)/epoc32/include/dependency.rh
sbs -f- -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel"""
t.run()
+
t.id = "0098c"
t.name ="redundant_header_dependencies"
@@ -102,6 +121,7 @@
t.warnings = 1
t.run()
+
t.id = "0098d"
t.name ="invalid_dependency_files"
t.description = "Invalidate dependency files, then make sure we can clean and re-build successfully"
@@ -111,19 +131,18 @@
touch smoke_suite/test_resources/dependencies/dependency.cpp
echo INVALIDATE_ARMV5_DEPENDENCY_FILE >> """+buildLocation+"""/armv5/urel/dependency.o.d
echo INVALIDATE_WINSCW_DEPENDENCY_FILE >> """+buildLocation+"""/winscw/urel/dependency.o.d
- echo INVALIDATE_TOOLS2_DEPENDENCY_FILE >> """+buildLocation+"""/dependency_exe/tools2/rel/dependency.o.d
+ echo INVALIDATE_TOOLS2_DEPENDENCY_FILE >> """+buildLocation+"""/dependency_exe/tools2/rel/"""+hostPlatformOffset+"""dependency.o.d
echo INVALIDATE_RESOURCE_DEPENDENCY_FILE >> """+buildLocation+"""/dependency__resource_apps_sc.rpp.d
sbs -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel
sbs -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel clean
- sbs -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel"""
- t.targets = targets
+ sbs -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel"""
t.mustmatch = []
t.countmatch = []
t.warnings = 0
t.errors = 1 # We expect an error from the first build due to the deliberate dependency file corruption
- t.run()
+ t.targets = hostPlatformTargets
+ t.run(hostPlatform)
- t.errors = 0
t.id = "0098e"
t.name ="no_depend_include"
@@ -134,10 +153,12 @@
touch smoke_suite/test_resources/dependencies/dependency.cpp
echo INVALIDATE_ARMV5_DEPENDENCY_FILE >> """+buildLocation+"""/armv5/urel/dependency.o.d
echo INVALIDATE_WINSCW_DEPENDENCY_FILE >> """+buildLocation+"""/winscw/urel/dependency.o.d
- echo INVALIDATE_TOOLS2_DEPENDENCY_FILE >> """+buildLocation+"""/dependency_exe/tools2/rel/dependency.o.d
- sbs --no-depend-include -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel"""
- t.targets = targets
- t.run()
+ echo INVALIDATE_TOOLS2_DEPENDENCY_FILE >> """+buildLocation+"""/dependency_exe/tools2/rel/"""+hostPlatformOffset+"""dependency.o.d
+ sbs --no-depend-include -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel"""
+ t.errors = 0
+ t.targets = hostPlatformTargets
+ t.run(hostPlatform)
+
t.id = "0098f"
t.name ="no_depend_generate"
@@ -149,19 +170,20 @@
touch smoke_suite/test_resources/dependencies/main.cpp
echo INVALIDATE_ARMV5_DEPENDENCY_FILE >> """+buildLocation+"""/armv5/urel/dependency.o.d
echo INVALIDATE_WINSCW_DEPENDENCY_FILE >> """+buildLocation+"""/winscw/urel/dependency.o.d
- echo INVALIDATE_TOOLS2_DEPENDENCY_FILE >> """+buildLocation+"""/dependency_exe/tools2/rel/dependency.o.d
- sbs --no-depend-generate -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel"""
- t.targets = targets
+ echo INVALIDATE_TOOLS2_DEPENDENCY_FILE >> """+buildLocation+"""/dependency_exe/tools2/rel/"""+hostPlatformOffset+"""dependency.o.d
+ sbs --no-depend-generate -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel"""
t.antitargets = [
buildLocation+"/armv5/urel/main.o.d",
buildLocation+"/armv5/udeb/main.o.d",
buildLocation+"/winscw/urel/main.o.d",
buildLocation+"/winscw/udeb/main.o.d",
- buildLocation+"/dependency_exe/tools2/rel/main.o.d"
+ buildLocation+"/dependency_exe/tools2/rel/"+hostPlatformOffset+"main.o.d"
]
- t.run()
+ t.targets = hostPlatformTargets
+ t.run(hostPlatform)
t.id = "98"
t.name = "dependencies"
t.print_result()
return t
+