def run(): t = AntiTargetSmokeTest() t.description = "Test the filter_exes filter" log = "< smoke_suite/test_resources/logexamples/filter_exes.log" t.usebash = True t.name = "filter_exes_all_exes" t.id = "999a" t.command = "sbs_filter --filter=filter_exes[] " + log + " -f ${SBSLOGFILE} -m ${SBSMAKEFILE} && cat one_armv5_urel.txt" t.mustmatch = [ "Wrote 1 file\(s\) into one_armv5_urel\.txt", "Wrote 1 file\(s\) into two_winscw_udeb\.txt", "^one\.exe$" ] t.targets = ["one_armv5_urel.txt", "two_winscw_udeb.txt"] t.antitargets = ["ignore_armv5_udeb.txt", "ignore_armv5_urel.txt"] t.run() t.name = "filter_exes_by_layer" t.id = "999b" t.usebash = False t.command = "sbs_filter --filter=filter_exes[layer=two] " + log t.mustmatch = ["Wrote 1 file\(s\) into two_winscw_udeb\.txt"] t.mustnotmatch = ["Wrote 1 file\(s\) into one_armv5_urel\.txt"] t.targets = ["two_winscw_udeb.txt"] t.antitargets = [ "ignore_armv5_udeb.txt", "ignore_armv5_urel.txt", "one_armv5_urel.txt" ] t.run() t.name = "filter_exes_by_config" t.id = "999c" t.command = "sbs_filter --filter=filter_exes[config=armv5_urel] " + log t.mustmatch = ["Wrote 1 file\(s\) into one_armv5_urel\.txt"] t.mustnotmatch = ["Wrote 1 file\(s\) into two_winscw_udeb\.txt"] t.targets = ["one_armv5_urel.txt"] t.antitargets = [ "ignore_armv5_udeb.txt", "ignore_armv5_urel.txt", "two_winscw_udeb.txt" ] t.run() t.clean() t.name = "filter_exes_specified_output" t.id = "999d" t.command = "sbs_filter --filter=filter_exes[output=$(EPOCROOT)/epoc32/build/filter_exes_test] " + log t.mustmatch = [ "Wrote 1 file\(s\) into .*epoc32/build/filter_exes_test[/\\\\]one_armv5_urel\.txt", "Wrote 1 file\(s\) into .*epoc32/build/filter_exes_test[/\\\\]two_winscw_udeb\.txt" ] t.targets = [ "$(EPOCROOT)/epoc32/build/filter_exes_test/one_armv5_urel.txt", "$(EPOCROOT)/epoc32/build/filter_exes_test/two_winscw_udeb.txt" ] t.run() t.id = "999" t.name = "filter_exes" return t
def run(): t = AntiTargetSmokeTest() t.description = "Test the filter_exes filter" log = "< smoke_suite/test_resources/logexamples/filter_exes.log" t.usebash = True t.name = "filter_exes_all_exes" t.id = "999a" t.command = "sbs_filter --filter=filter_exes[] "+log+" -f ${SBSLOGFILE} -m ${SBSMAKEFILE} && cat one_armv5_urel.txt" t.mustmatch = [ "Wrote 1 file\(s\) into one_armv5_urel\.txt", "Wrote 1 file\(s\) into two_winscw_udeb\.txt", "^one\.exe$" ] t.targets = [ "one_armv5_urel.txt", "two_winscw_udeb.txt" ] t.antitargets = [ "ignore_armv5_udeb.txt", "ignore_armv5_urel.txt" ] t.run() t.name = "filter_exes_by_layer" t.id = "999b" t.usebash = False t.command = "sbs_filter --filter=filter_exes[layer=two] "+log t.mustmatch = [ "Wrote 1 file\(s\) into two_winscw_udeb\.txt" ] t.mustnotmatch = [ "Wrote 1 file\(s\) into one_armv5_urel\.txt" ] t.targets = [ "two_winscw_udeb.txt" ] t.antitargets = [ "ignore_armv5_udeb.txt", "ignore_armv5_urel.txt", "one_armv5_urel.txt" ] t.run() t.name = "filter_exes_by_config" t.id = "999c" t.command = "sbs_filter --filter=filter_exes[config=armv5_urel] "+log t.mustmatch = [ "Wrote 1 file\(s\) into one_armv5_urel\.txt" ] t.mustnotmatch = [ "Wrote 1 file\(s\) into two_winscw_udeb\.txt" ] t.targets = [ "one_armv5_urel.txt" ] t.antitargets = [ "ignore_armv5_udeb.txt", "ignore_armv5_urel.txt", "two_winscw_udeb.txt" ] t.run() t.clean() t.name = "filter_exes_specified_output" t.id = "999d" t.command = "sbs_filter --filter=filter_exes[output=$(EPOCROOT)/epoc32/build/filter_exes_test] "+log t.mustmatch = [ "Wrote 1 file\(s\) into .*epoc32/build/filter_exes_test[/\\\\]one_armv5_urel\.txt", "Wrote 1 file\(s\) into .*epoc32/build/filter_exes_test[/\\\\]two_winscw_udeb\.txt" ] t.targets = [ "$(EPOCROOT)/epoc32/build/filter_exes_test/one_armv5_urel.txt", "$(EPOCROOT)/epoc32/build/filter_exes_test/two_winscw_udeb.txt"] t.run() t.id = "999" t.name = "filter_exes" return t
def run(): t = AntiTargetSmokeTest() t.id = "19" t.name = "extension_reallyclean" t.description = "These 2 sets of tests are for testing REALLYCLEAN on TEM" \ + " files" t.usebash = True t.command = "sbs -b smoke_suite/test_resources/simple_extension/bld.inf " \ + "-c armv5_urel -m ${SBSMAKEFILE} -f ${SBSLOGFILE}; ls " \ + "$(EPOCROOT)/epoc32/build/tem_export_test; sbs -b " \ + "smoke_suite/test_resources/simple_extension/bld.inf -c " \ + "armv5_urel REALLYCLEAN -m ${SBSMAKEFILE}_2 -f ${SBSLOGFILE}_2" t.mustnotmatch = [ "ls.*/epoc32/build/tem_export_test: No such file or directory" ] t.antitargets = [ "$(EPOCROOT)/epoc32/build/tem_export_test", "$(EPOCROOT)/epoc32/tools/makefile_templates/sbsv2test/clean.mk", "$(EPOCROOT)/epoc32/tools/makefile_templates/sbsv2test/clean.meta", "$(EPOCROOT)/epoc32/tools/makefile_templates/sbsv2test/build.mk", "$(EPOCROOT)/epoc32/tools/makefile_templates/sbsv2test/build.meta", "$(EPOCROOT)/epoc32/release/armv5/urel/simple_extension.txt" ] t.run() return t
def run(): t = AntiTargetSmokeTest() t.name = "armv5_testcode" t.command = "sbs -b smoke_suite/test_resources/simple_test/bld.inf -c " + \ "armv5.test -f - " # Don't allow -f to be appended t.logfileOption = lambda :"" t.targets = [ "$(EPOCROOT)/epoc32/release/armv5/urel/simple_test_auto.exe", "$(EPOCROOT)/epoc32/release/armv5/urel/simple_test_manual.exe", "$(EPOCROOT)/epoc32/release/armv5/udeb/simple_test_auto.exe", "$(EPOCROOT)/epoc32/release/armv5/udeb/simple_test_manual.exe", "$(EPOCROOT)/epoc32/include/testexportheader.h", "$(EPOCROOT)/epoc32/data/z/test/smoke_suite_test_resources_simple_test/armv5.auto.bat", "$(EPOCROOT)/epoc32/data/z/test/smoke_suite_test_resources_simple_test/armv5.manual.bat" ] t.mustmatch = [".*/epoc32/data/z/test/smoke_suite_test_resources_simple_test/armv5.auto.bat</build>.*"] t.run() # Check armv5.auto.bat doesn't get generated with -p option t.name = "armv5_testcode_partial" t.command = "sbs -b smoke_suite/test_resources/simple_test/bld.inf " \ + "-c armv5.test -p simple_test_auto.mmp" del t.logfileOption t.targets = [] t.antitargets = [ "$(EPOCROOT)/epoc32/data/z/test/smoke_suite_test_resources_simple_test/armv5.auto.bat" ] t.mustmatch = [] t.mustnotmatch = [] t.warnings = 0 t.run() return t
def run(): t = AntiTargetSmokeTest() t.usebash = True t.name = "plugin_armv5_winscw_freeze" t.description = """Builds several ECOM plugins, with and without explicit DEFFILE statements, confirming the correct FREEZE behaviour in each case. The correct behaviour for a PLUGIN/PLUGIN3 is indicative of all TARGETTYPEs where the build system defines known exports: FREEZE should do nothing unless an explicit DEFFILE statement is present in the .mmp file. Also confirms: i) default UID2 settings for PLUGIN3 TARGETTYPEs and default resource generation locations for both PLUGIN and PLUGIN3 ii) non-generation of an import library where EXPORTUNFROZEN is used without a DEFFILE statement""" t.command = """ sbs -b smoke_suite/test_resources/simple_plugin/bld.inf -c armv5_urel -c winscw_urel CLEAN > /dev/null && sbs -f- -b smoke_suite/test_resources/simple_plugin/bld.inf -c armv5_urel -c winscw_urel && sbs -b smoke_suite/test_resources/simple_plugin/bld.inf -c armv5_urel -c winscw_urel FREEZE -m ${SBSMAKEFILE} -f ${SBSLOGFILE}""" t.targets = [ "smoke_suite/test_resources/simple_plugin/bwins/plugin2u.def", "smoke_suite/test_resources/simple_plugin/eabi/plugin2u.def", "$(EPOCROOT)/epoc32/data/z/resource/plugins/plugin.rsc", "$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/plugins/plugin.rsc", "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/plugins/plugin.rsc", "$(EPOCROOT)/epoc32/data/z/resource/plugins/plugin3.rsc", "$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/plugins/plugin3.rsc", "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/plugins/plugin3.rsc" ] t.antitargets = [ "smoke_suite/test_resources/simple_plugin/bwins/pluginu.def", "smoke_suite/test_resources/simple_plugin/eabi/pluginu.def", "$(EPOCROOT)/epoc32/release/winscw/udeb/plugin4.lib", "$(EPOCROOT)/epoc32/release/armv5/lib/plugin4.dso", "$(EPOCROOT)/epoc32/release/armv5/lib/plugin4{000a0000}.dso" ] t.mustmatch = [ ".*EFREEZE: Appending 3 New Export\(s\) to .*/test/smoke_suite/test_resources/simple_plugin/eabi/plugin2u.def.*", ".*EFREEZE: Appending 1 New Export\(s\) to .*/test/smoke_suite/test_resources/simple_plugin/bwins/plugin2u.def.*", ".*__EMULATOR_IMAGE_HEADER2\(0x10000079,0x10009D93,0x00000000.*", ".*elf2e32.*--targettype=PLUGIN3.*--output=.*plugin3.dll.*--uid2=0x10009D93.*" ] t.mustnotmatch = [ ".*EFREEZE: .*/test/smoke_suite/test_resources/simple_plugin/eabi/pluginu.def.*", ".*EFREEZE: .*/test/smoke_suite/test_resources/simple_plugin/bwins/pluginu.def.*" ] t.warnings = 4 t.run() return t
def run(): t = AntiTargetSmokeTest() t.name = "armv5_testcode" t.command = "sbs -b smoke_suite/test_resources/simple_test/bld.inf -c " + \ "armv5.test -f - " # Don't allow -f to be appended t.logfileOption = lambda: "" t.targets = [ "$(EPOCROOT)/epoc32/release/armv5/urel/simple_test_auto.exe", "$(EPOCROOT)/epoc32/release/armv5/urel/simple_test_manual.exe", "$(EPOCROOT)/epoc32/release/armv5/udeb/simple_test_auto.exe", "$(EPOCROOT)/epoc32/release/armv5/udeb/simple_test_manual.exe", "$(EPOCROOT)/epoc32/include/testexportheader.h", "$(EPOCROOT)/epoc32/data/z/test/smoke_suite_test_resources_simple_test/armv5.auto.bat", "$(EPOCROOT)/epoc32/data/z/test/smoke_suite_test_resources_simple_test/armv5.manual.bat" ] t.mustmatch = [ ".*/epoc32/data/z/test/smoke_suite_test_resources_simple_test/armv5.auto.bat</build>.*" ] t.run() # Check armv5.auto.bat doesn't get generated with -p option t.name = "armv5_testcode_partial" t.command = "sbs -b smoke_suite/test_resources/simple_test/bld.inf " \ + "-c armv5.test -p simple_test_auto.mmp" del t.logfileOption t.targets = [] t.antitargets = [ "$(EPOCROOT)/epoc32/data/z/test/smoke_suite_test_resources_simple_test/armv5.auto.bat" ] t.mustmatch = [] t.mustnotmatch = [] t.warnings = 0 t.run() return t
def run(): t = AntiTargetSmokeTest() t.usebash = True genericTargets = [ "$(EPOCROOT)/epoc32/release/armv5/udeb/dependency.exe", "$(EPOCROOT)/epoc32/release/armv5/udeb/dependency.exe.map", "$(EPOCROOT)/epoc32/release/armv5/urel/dependency.exe", "$(EPOCROOT)/epoc32/release/armv5/urel/dependency.exe.map", "$(EPOCROOT)/epoc32/release/winscw/urel/dependency.exe", "$(EPOCROOT)/epoc32/release/winscw/urel/dependency.exe.map", "$(EPOCROOT)/epoc32/release/winscw/udeb/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", "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/dependency.rsc", "$(EPOCROOT)/epoc32/include/main.rsg", "$(EPOCROOT)/epoc32/data/z/resource/apps/main.rsc", "$(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/$(HOSTPLATFORM32_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.name = "baseline_build" t.description = "Build a component with source and resource files that are dependent on header files exported in the build" t.command = """ 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.mustnotmatch = [ "<warning>Missing dependency detected: .*</warning>" ] t.targets = hostPlatformTargets t.run(hostPlatform) if t.result == AntiTargetSmokeTest.SKIP: hostPlatform = "linux" hostPlatformTargets = genericTargets + linuxTargets hostPlatformOffset = "$(HOSTPLATFORM32_DIR)/" t.targets = hostPlatformTargets t.run(hostPlatform) # Ensure we don't clean up from the previous build in the following two tests t.targets = [] # Core expected outcome for the following two tests t.mustmatch = [ ".*recipe name='compile' target='.*dependency\.o'", ".*recipe name='win32compile2object' target='.*dependency\.o'", ".*recipe name='compile2object' target='.*dependency\.o'", ".*recipe name='resourcecompile' target='.*dependency\.rsc'" ] t.countmatch = [ [".*recipe name='compile'", 2], [".*recipe name='win32compile2object'", 2], [".*recipe name='compile2object'", 1], [".*recipe name='resourcecompile", 2] ] t.name ="touched_header_dependencies" t.description = "Touch the exported header files and check that only the related source and resource files are re-built" t.command = """ sleep 1 touch $(EPOCROOT)/epoc32/include/dependency.h touch $(EPOCROOT)/epoc32/include/dependency.rh sbs -f- -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel""" t.run() t.name ="redundant_header_dependencies" t.description = """ Build the component again, but manipulate it so that (a) it no longer has a dependency on the exported header files and (b) the header files have been removed and (c) the header files are no longer exported. Check that only the related source and resource files are re-built""" t.command = """ cp smoke_suite/test_resources/dependencies/src/dependency2.cpp smoke_suite/test_resources/dependencies/dependency.cpp cp smoke_suite/test_resources/dependencies/src/dependency2.rss smoke_suite/test_resources/dependencies/dependency.rss rm -rf $(EPOCROOT)/epoc32/include/dependency.h rm -rf $(EPOCROOT)/epoc32/include/dependency.rh sbs -f- --noexport -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel""" t.mustnotmatch = [] # Note that the resource build does not exhibit a missing dependency as its dependency files are generated in a separate stage where # the target file isn't actually a target of that stage t.mustmatch.extend([ "<warning>Missing dependency detected: .*/epoc32/include/dependency.h</warning>" ]) t.warnings = 1 t.run() t.name ="invalid_dependency_files" t.description = "Invalidate dependency files, then make sure we can clean and re-build successfully" buildLocation = "$(EPOCROOT)/epoc32/build/" + BldInfFile.outputPathFragment('smoke_suite/test_resources/dependencies/bld.inf') + "/dependency_" # use one long bash command so that we can capture # the output in a way that isn't messed up with all the ordering confused. t.command = " echo \"making directory for logfile ${{SBSLOGFILE}}\" ; mkdir -p `dirname ${{SBSLOGFILE}} 2>/dev/null` ; {{ sleep 1 ; set -x ; \ touch smoke_suite/test_resources/dependencies/dependency.cpp; \ echo INVALIDATE_ARMV5_DEPENDENCY_FILE >> {0}/armv5/urel/dependency.o.d ; \ echo INVALIDATE_WINSCW_DEPENDENCY_FILE >> {0}/winscw/urel/dependency.o.d ;\ echo INVALIDATE_TOOLS2_DEPENDENCY_FILE >> {0}/dependency_exe/tools2/rel/{1}/dependency.o.d ;\ echo INVALIDATE_RESOURCE_DEPENDENCY_FILE >> {0}/dependency__resource_apps.rsc.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 ; }} > ${{SBSLOGFILE}} 2>&1; grep 'missing separator' ${{SBSLOGFILE}} ".format(buildLocation, hostPlatformOffset) # We expect an error from the first build due to the deliberate dependency file corruption t.mustmatch = [ ".*dependency.o.d:[0-9]+: \*\*\* missing separator" ] t.countmatch = [] t.warnings = 0 t.errors = 0 t.targets = hostPlatformTargets t.run(hostPlatform) t.name ="no_depend_include" t.description = "Invalidate dependency files in order to confirm they aren't processed when --no-depend-include is used" buildLocation = "$(EPOCROOT)/epoc32/build/" + BldInfFile.outputPathFragment('smoke_suite/test_resources/dependencies/bld.inf') + "/dependency_" t.command = """ sleep 1 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/"""+hostPlatformOffset+"""dependency.o.d sbs --no-depend-include -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel""" t.mustmatch = [] t.errors = 0 t.targets = hostPlatformTargets t.run(hostPlatform) t.name ="no_depend_generate" t.description = "Invalidate and remove dependency files in order to confirm they are neither included nor re-generated when --no-depend-generate is used" buildLocation = "$(EPOCROOT)/epoc32/build/" + BldInfFile.outputPathFragment('smoke_suite/test_resources/dependencies/bld.inf') + "/dependency_" t.command = """ sleep 1 touch smoke_suite/test_resources/dependencies/dependency.cpp 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/"""+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/"+hostPlatformOffset+"main.o.d" ] t.targets = hostPlatformTargets t.run(hostPlatform) # clean-up os.remove("smoke_suite/test_resources/dependencies/dependency.cpp") os.remove("smoke_suite/test_resources/dependencies/dependency.rss") t.name = "dependencies" t.print_result() return t
def run(): t = AntiTargetSmokeTest() t.usebash = True command = "sbs -b smoke_suite/test_resources/simple_dll/bld.inf -c {0} -f-" maintargets = [ "$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll.dll.sym", "$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll.dll.sym", "$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll.dso", "$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll{000a0000}.dso", "$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll.dll", "$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll.dll" ] abiv1libtargets = [ "$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll.lib", "$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll{000a0000}.lib" ] buildtargets = [ "createstaticdll_dll/armv5/udeb/CreateStaticDLL.o", "createstaticdll_dll/armv5/urel/CreateStaticDLL.o" ] mustmatch = [r".*\busrt\d_\d\.lib\b.*", r".*\bscppnwdl\.dso\b.*"] mustnotmatch = [".*ksrt.*"] # Note that ABIv1 import libraries are only generated for RVCT-based armv5 # builds on Windows if the kit asks for it (off by default) t.name = "dll_armv5_rvct" t.command = command.format("armv5") t.targets = maintargets[:] # Shallow, as we optionally extend later and then re-use t.addbuildtargets('smoke_suite/test_resources/simple_dll/bld.inf', buildtargets) t.mustmatch = mustmatch t.mustnotmatch = mustnotmatch t.run() t.name = "dll_armv5_rvct_abiv1" t.command += " --configpath=test/config/abiv1kit" t.targets.extend(abiv1libtargets) t.run("windows") t.name = "dll_armv5_clean" t.command = "sbs -b smoke_suite/test_resources/simple_dll/bld.inf -c armv5 clean" t.targets = [] t.mustmatch = [] t.mustnotmatch = [] t.run() t.name = "dll_armv5_gcce" t.command = command.format("gcce_armv5") t.targets = maintargets t.antitargets = abiv1libtargets t.addbuildtargets('smoke_suite/test_resources/simple_dll/bld.inf', buildtargets) t.mustmatch = mustmatch t.mustmatch.append("-funsigned-bitfields") t.mustnotmatch = mustnotmatch t.run() t.name = "dll_armv5" t.print_result() return t
def run(): t = AntiTargetSmokeTest() t.description = """ Tests the creation and content of .iby romfiles generated for the armv5.test configuration. Also tests for creation of relevant test batch files. """ t.usebash = True # Don't allow -m or -f to be appended t.logfileOption = lambda :"" t.makefileOption = lambda :"" # Check correct .iby and 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}" t.targets = [ "$(EPOCROOT)/epoc32/rom/src/ongoing/group/romfile/armv5test.iby", "$(EPOCROOT)/epoc32/rom/src/ongoing/group/romfile/armv5testn.iby", "$(EPOCROOT)/epoc32/data/z/test/src_ongoing_romfile/armv5.auto.bat", "$(EPOCROOT)/epoc32/data/z/test/src_ongoing_romfile/armv5.manual.bat" ] t.warnings = 0 if t.onWindows else 2 t.run() t.name = "romfile_content_exsymbian" t.command = "cat $(EPOCROOT)/epoc32/rom/src/ongoing/group/romfile/armv5test.iby" t.mustmatch = [ # The comment that is put at the start of the file. r".*// epoc32/rom/src/ongoing/group/romfile/armv5test\.iby\n.*", # The batch files that are added by the build system. r".*\ndata=/epoc32/data/z/test/src_ongoing_romfile/armv5\.auto\.bat test/romfile\.auto\.bat\n.*", r".*\ndata=/epoc32/data/z/test/src_ongoing_romfile/armv5\.manual\.bat test/romfile\.manual\.bat\n.*", # Some normal files. r".*\nfile=/epoc32/release/##MAIN##/##BUILD##/t_rand\.exe\s+sys/bin/t_rand\.exe\n.*", r".*\nfile=/epoc32/release/##MAIN##/##BUILD##/t_swapfsys\.exe\s+sys/bin/t_swapfsys\.exe\n.*", r".*\nfile=/epoc32/release/##MAIN##/##BUILD##/t_localtime\.exe\s+sys/bin/t_localtime\.exe\n.*", # Some files where the MMP file has the PAGED or UNPAGED keywords. r".*\nfile=/epoc32/release/##MAIN##/##BUILD##/t_pagestress\.exe\s+sys/bin/t_pagestress\.exe\n.*", r".*\nfile=/epoc32/release/##MAIN##/##BUILD##/t_fsys\.exe\s+sys/bin/t_fsys\.exe\n.*", # Some files where the MMP file has the ROMTARGET or RAMTARGET keywords. r".*\ndata=/epoc32/release/##MAIN##/##BUILD##/t_prel\.dll\s+/sys/bin/t_prel\.dll attrib=r\n.*", r".*\nfile=/epoc32/release/##MAIN##/##BUILD##/t_sysbin\.exe\s+sys/bin/t_sysbin\.exe\n.*", r".*\ndata=/epoc32/release/##MAIN##/##BUILD##/t_sysbin\.exe\s+/sys/bin/t_sysbin_ram\.exe attrib=r\n.*", r".*\nfile=/epoc32/release/##MAIN##/##BUILD##/t_sysbin\.exe\s+/sys/bin/t_sysbina\.exe\n.*", r".*\nfile=/epoc32/release/##MAIN##/##BUILD##/t_sysbin\.exe\s+/system/programs/t_sysbinb\.exe\n.*", ] if t.onWindows: t.mustmatch.extend([ # romstuff.mke additions - extension makefile added, so only apply on Windows r".*\ndata=..\\..\\f32test\\server\\t_file.cpp\s+Test\\T_file.cpp\n.*", r".*\ndata=..\\..\\f32test\\server\\t_findcaptestfile.txt\s+\\sys\\bin\\t_findcaptestfile.txt\n.*" ]) t.mustnotmatch = [ # Try to detect file paths that contain two or more slashes in a row, # without flagging C++ style comments. r"\w//+\w", # Confirm that no Nokia-format macros are present r"ABI_DIR", r"BUILD_DIR" ] t.targets = [] t.warnings = 0 t.run() t.name = "romfile_content_nokia" t.command = "cat $(EPOCROOT)/epoc32/rom/src/ongoing/group/romfile/armv5testn.iby" t.mustmatch = [ # The comment that is put at the start of the file. r".*// epoc32/rom/src/ongoing/group/romfile/armv5testn\.iby\n.*", # The batch files that are added by the build system. r".*\ndata=/epoc32/data/z/test/src_ongoing_romfile/armv5\.auto\.bat test/romfile\.auto\.bat\n.*", r".*\ndata=/epoc32/data/z/test/src_ongoing_romfile/armv5\.manual\.bat test/romfile\.manual\.bat\n.*", # Some normal files. r".*\nfile=ABI_DIR/BUILD_DIR/t_rand\.exe\s+sys/bin/t_rand\.exe\n.*", r".*\nfile=ABI_DIR/BUILD_DIR/t_swapfsys\.exe\s+sys/bin/t_swapfsys\.exe\n.*", r".*\nfile=ABI_DIR/BUILD_DIR/t_localtime\.exe\s+sys/bin/t_localtime\.exe\n.*", # Some files where the MMP file has the PAGED or UNPAGED keywords. r".*\nfile=ABI_DIR/BUILD_DIR/t_pagestress\.exe\s+sys/bin/t_pagestress\.exe\n.*", r".*\nfile=ABI_DIR/BUILD_DIR/t_fsys\.exe\s+sys/bin/t_fsys\.exe\n.*", # Some files where the MMP file has the ROMTARGET or RAMTARGET keywords. r".*\ndata=ABI_DIR/BUILD_DIR/t_prel\.dll\s+/sys/bin/t_prel\.dll attrib=r\n.*", r".*\nfile=ABI_DIR/BUILD_DIR/t_sysbin\.exe\s+sys/bin/t_sysbin\.exe\n.*", r".*\ndata=ABI_DIR/BUILD_DIR/t_sysbin\.exe\s+/sys/bin/t_sysbin_ram\.exe attrib=r\n.*", r".*\nfile=ABI_DIR/BUILD_DIR/t_sysbin\.exe\s+/sys/bin/t_sysbina\.exe\n.*", r".*\nfile=ABI_DIR/BUILD_DIR/t_sysbin\.exe\s+/system/programs/t_sysbinb\.exe\n.*", # append_iby.flm additions from multiple START EXTENSION blocks r".*\ndata=../../f32test/server/t_file.cpp\s+Test/T_file.cpp\n.*", r".*\ndata=../../f32test/server/t_findcaptestfile.txt\s+/sys/bin/t_findcaptestfile.txt\n.*" ] t.mustnotmatch = [ # Try to detect file paths that contain two or more slashes in a row, # without flagging C++ style comments. r"\w//+\w", # Confirm that no exSymbian-format macros are present r"##MAIN##", r"##BUILD##" ] t.targets = [] t.warnings = 0 t.run() 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/rom/src/ongoing/group/romfile/armv5testn.iby</build>.*", r".*/epoc32/data/z/test/src_ongoing_romfile/armv5.auto.bat</build>.*", r".*/epoc32/data/z/test/src_ongoing_romfile/armv5.manual.bat</build>.*" ] t.mustnotmatch = [] t.warnings = 0 if t.onWindows else 2 t.run() t.name = "romfile_mmp_include_twice_general" t.command = "sbs -b $(EPOCROOT)/src/e32test/group/bld.inf " \ + "-b $(EPOCROOT)/src/falcon/test/bld.inf " \ + "-c armv5.test ROMFILE -m ${SBSMAKEFILE} -f ${SBSLOGFILE} " t.targets = [ "$(EPOCROOT)/epoc32/rom/src/e32test/group/armv5test.iby", "$(EPOCROOT)/epoc32/rom/src/e32test/group/armv5testn.iby" ] t.mustmatch = [] t.warnings = 0 t.run() t.name = "romfile_mmp_include_twice_content_exsymbian" t.command = "cat $(EPOCROOT)/epoc32/rom/src/e32test/group/armv5test.iby" t.targets = [] t.mustmatch = [ r".*\ndevice\[MAGIC\]=/epoc32/release/##KMAIN##/##BUILD##/d_nanowait\.ldd\s+sys/bin/d_nanowait\.ldd\n.*", r".*\ndevice\[MAGIC\]=/epoc32/release/##KMAIN##/##BUILD##/d_pagingexample_2_post.ldd\s+sys/bin/d_pagingexample_2_post.ldd\n.*", ] t.mustnotmatch = [ # These two files are from two mmp files that included in both bld.inf # They shouldn't be in the ROM r".*/d_medch.ldd\s.*" r".*/d_dma.ldd\s.*" ] t.warnings = 0 t.run() t.name = "romfile_mmp_include_twice_content_nokia" t.command = "cat $(EPOCROOT)/epoc32/rom/src/e32test/group/armv5testn.iby" t.targets = [] t.mustmatch = [ r".*\ndevice\[VARID\]=ABI_DIR/BUILD_DIR/d_nanowait\.ldd\s+sys/bin/d_nanowait\.ldd\n.*", r".*\ndevice\[VARID\]=ABI_DIR/BUILD_DIR/d_pagingexample_2_post.ldd\s+sys/bin/d_pagingexample_2_post.ldd\n.*", ] t.mustnotmatch = [ # These two files are from two mmp files that included in both bld.inf # They shouldn't be in the ROM r".*/d_medch.ldd\s.*" r".*/d_dma.ldd\s.*" ] t.warnings = 0 t.run() # Check armv5.auto.bat doesn't get generated with -p option t.name = "romfile_partial" t.command = "sbs -b $(EPOCROOT)/src/ongoing/group/romfile/other_name.inf " \ + "-c armv5.test ROMFILE -p t_rcache.mmp" t.antitargets = [ "$(EPOCROOT)/epoc32/data/z/test/src_ongoing_romfile/armv5.auto.bat" ] t.mustmatch = [] t.mustnotmatch = [] t.warnings = 0 if t.onWindows else 2 t.run() t.name = "romfile" t.print_result() return t
def run(): t = AntiTargetSmokeTest() t.usebash = True command = "sbs -b smoke_suite/test_resources/simple_dll/bld.inf -c %s -f-" maintargets = [ "$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll.dll.sym", "$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll.dll.sym", "$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll.dso", "$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll{000a0000}.dso", "$(EPOCROOT)/epoc32/release/armv5/udeb/createstaticdll.dll", "$(EPOCROOT)/epoc32/release/armv5/urel/createstaticdll.dll" ] abiv1libtargets = [ "$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll.lib", "$(EPOCROOT)/epoc32/release/armv5/lib/createstaticdll{000a0000}.lib" ] buildtargets = [ "createstaticdll_dll/armv5/udeb/CreateStaticDLL.o", "createstaticdll_dll/armv5/urel/CreateStaticDLL.o" ] mustmatch = [ r".*\busrt\d_\d\.lib\b.*", r".*\bscppnwdl\.dso\b.*" ] mustnotmatch = [ ".*ksrt.*" ] # Note that ABIv1 import libraries are only generated for RVCT-based armv5 # builds on Windows if the kit asks for it (off by default) t.id = "0009a" t.name = "dll_armv5_rvct" t.command = command % "armv5" t.targets = maintargets[:] # Shallow, as we optionally extend later and then re-use t.addbuildtargets('smoke_suite/test_resources/simple_dll/bld.inf', buildtargets) t.mustmatch = mustmatch t.mustnotmatch = mustnotmatch t.run() t.id = "0009b" t.name = "dll_armv5_rvct_abiv1" t.command += " --configpath=test/config/abiv1kit" t.targets.extend(abiv1libtargets) t.run("windows") t.id = "0009c" t.name = "dll_armv5_clean" t.command = "sbs -b smoke_suite/test_resources/simple_dll/bld.inf -c armv5 clean" t.targets = [] t.mustmatch = [] t.mustnotmatch = [] t.run() t.id = "0009d" t.name = "dll_armv5_gcce" t.command = command % "gcce_armv5" t.targets = maintargets t.antitargets = abiv1libtargets t.addbuildtargets('smoke_suite/test_resources/simple_dll/bld.inf', buildtargets) t.mustmatch = mustmatch t.mustnotmatch = mustnotmatch t.run() t.id = "9" t.name = "dll_armv5" t.print_result() return t
def run(): t = AntiTargetSmokeTest() t.usebash = True command = "sbs -b smoke_suite/test_resources/simple_dll/pbld.inf -c {0} -f -" maintargets = [ "$(EPOCROOT)/epoc32/release/{0}/udeb/createstaticpdll.dll.sym", "$(EPOCROOT)/epoc32/release/{0}/urel/createstaticpdll.dll.sym", "$(EPOCROOT)/epoc32/release/{0}/udeb/createstaticpdll.dll", "$(EPOCROOT)/epoc32/release/{0}/urel/createstaticpdll.dll" ] armv5targets = [ "$(EPOCROOT)/epoc32/release/{0}/lib/createstaticpdll.dso", "$(EPOCROOT)/epoc32/release/{0}/lib/createstaticpdll{000a0000}.dso" ] buildtargets = [ "createstaticpdll_dll/{0}/udeb/CreateStaticDLL.o", "createstaticpdll_dll/{0}/urel/CreateStaticDLL.o" ] mustmatch = [ r".*\busrt\d_\d\.lib\b.*", r".*\bscppnwdl\.dso\b.*" ] mustnotmatch = [ ".*ksrt.*" ] t.name = "pdll_armv5_rvct" t.command = command.format("armv5") t.targets = [p.replace("{0}","armv5") for p in maintargets + armv5targets][:] # Shallow, as we optionally extend later and then re-use t.addbuildtargets('smoke_suite/test_resources/simple_dll/pbld.inf', [p.format("armv5") for p in buildtargets]) t.mustmatch = mustmatch t.mustnotmatch = mustnotmatch t.run() t.name = "pdll_armv5_clean" t.command = command.format("armv5") + " clean" t.targets = [] t.mustmatch = [] t.mustnotmatch = [] t.run() t.name = "pdll_armv5_gcce" t.command = command.format("gcce_armv5") t.targets = [p.replace("{0}","armv5") for p in maintargets + armv5targets] t.addbuildtargets('smoke_suite/test_resources/simple_dll/pbld.inf', [p.format("armv5") for p in buildtargets]) t.mustmatch = mustmatch t.mustnotmatch = mustnotmatch t.run() t.name = "pdll_armv5_gcce_clean" t.command = command.format("gcce_armv5") + " clean" t.targets = [] t.mustmatch = [] t.mustnotmatch = [] t.run() t.name = "pdll_armv7_rvct" t.command = command.format("armv7") t.targets = [p.replace("{0}","armv7") for p in maintargets][:] # Shallow, as we optionally extend later and then re-use t.addbuildtargets('smoke_suite/test_resources/simple_dll/pbld.inf', [p.format("armv7") for p in buildtargets]) t.mustmatch = mustmatch t.mustnotmatch = mustnotmatch t.run() t.name = "pdll_armv7_clean" t.command = command.format("armv7") + " clean" t.targets = [] t.mustmatch = [] t.mustnotmatch = [] t.run() t.name = "pdll_armv7_gcce" t.command = command.format("arm.v7.udeb.gcce4_5_1 -c arm.v7.urel.gcce4_3_2") t.targets = [p.replace("{0}","armv7") for p in maintargets] t.addbuildtargets('smoke_suite/test_resources/simple_dll/pbld.inf', [p.format("armv7") for p in buildtargets]) t.mustmatch = mustmatch t.mustnotmatch = mustnotmatch t.run() t.name = "pdll_arm" t.print_result() return t
def run(): t = AntiTargetSmokeTest() t.description = """ Tests the creation and content of .iby romfiles generated for the armv5.test configuration. Also tests for creation of relevant test batch files. """ t.usebash = True # Don't allow -m or -f to be appended t.logfileOption = lambda: "" t.makefileOption = lambda: "" # Check correct .iby and 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}" t.targets = [ "$(EPOCROOT)/epoc32/rom/src/ongoing/group/romfile/armv5test.iby", "$(EPOCROOT)/epoc32/rom/src/ongoing/group/romfile/armv5testn.iby", "$(EPOCROOT)/epoc32/data/z/test/src_ongoing_romfile/armv5.auto.bat", "$(EPOCROOT)/epoc32/data/z/test/src_ongoing_romfile/armv5.manual.bat" ] t.warnings = 0 if t.onWindows else 2 t.run() t.name = "romfile_content_exsymbian" t.command = "cat $(EPOCROOT)/epoc32/rom/src/ongoing/group/romfile/armv5test.iby" t.mustmatch = [ # The comment that is put at the start of the file. r".*// epoc32/rom/src/ongoing/group/romfile/armv5test\.iby\n.*", # The batch files that are added by the build system. r".*\ndata=/epoc32/data/z/test/src_ongoing_romfile/armv5\.auto\.bat test/romfile\.auto\.bat\n.*", r".*\ndata=/epoc32/data/z/test/src_ongoing_romfile/armv5\.manual\.bat test/romfile\.manual\.bat\n.*", # Some normal files. r".*\nfile=/epoc32/release/##MAIN##/##BUILD##/t_rand\.exe\s+sys/bin/t_rand\.exe\n.*", r".*\nfile=/epoc32/release/##MAIN##/##BUILD##/t_swapfsys\.exe\s+sys/bin/t_swapfsys\.exe\n.*", r".*\nfile=/epoc32/release/##MAIN##/##BUILD##/t_localtime\.exe\s+sys/bin/t_localtime\.exe\n.*", # Some files where the MMP file has the PAGED or UNPAGED keywords. r".*\nfile=/epoc32/release/##MAIN##/##BUILD##/t_pagestress\.exe\s+sys/bin/t_pagestress\.exe\n.*", r".*\nfile=/epoc32/release/##MAIN##/##BUILD##/t_fsys\.exe\s+sys/bin/t_fsys\.exe\n.*", # Some files where the MMP file has the ROMTARGET or RAMTARGET keywords. r".*\ndata=/epoc32/release/##MAIN##/##BUILD##/t_prel\.dll\s+/sys/bin/t_prel\.dll attrib=r\n.*", r".*\nfile=/epoc32/release/##MAIN##/##BUILD##/t_sysbin\.exe\s+sys/bin/t_sysbin\.exe\n.*", r".*\ndata=/epoc32/release/##MAIN##/##BUILD##/t_sysbin\.exe\s+/sys/bin/t_sysbin_ram\.exe attrib=r\n.*", r".*\nfile=/epoc32/release/##MAIN##/##BUILD##/t_sysbin\.exe\s+/sys/bin/t_sysbina\.exe\n.*", r".*\nfile=/epoc32/release/##MAIN##/##BUILD##/t_sysbin\.exe\s+/system/programs/t_sysbinb\.exe\n.*", ] if t.onWindows: t.mustmatch.extend([ # romstuff.mke additions - extension makefile added, so only apply on Windows r".*\ndata=..\\..\\f32test\\server\\t_file.cpp\s+Test\\T_file.cpp\n.*", r".*\ndata=..\\..\\f32test\\server\\t_findcaptestfile.txt\s+\\sys\\bin\\t_findcaptestfile.txt\n.*" ]) t.mustnotmatch = [ # Try to detect file paths that contain two or more slashes in a row, # without flagging C++ style comments. r"\w//+\w", # Confirm that no Nokia-format macros are present r"ABI_DIR", r"BUILD_DIR" ] t.targets = [] t.warnings = 0 t.run() t.name = "romfile_content_nokia" t.command = "cat $(EPOCROOT)/epoc32/rom/src/ongoing/group/romfile/armv5testn.iby" t.mustmatch = [ # The comment that is put at the start of the file. r".*// epoc32/rom/src/ongoing/group/romfile/armv5testn\.iby\n.*", # The batch files that are added by the build system. r".*\ndata=/epoc32/data/z/test/src_ongoing_romfile/armv5\.auto\.bat test/romfile\.auto\.bat\n.*", r".*\ndata=/epoc32/data/z/test/src_ongoing_romfile/armv5\.manual\.bat test/romfile\.manual\.bat\n.*", # Some normal files. r".*\nfile=ABI_DIR/BUILD_DIR/t_rand\.exe\s+sys/bin/t_rand\.exe\n.*", r".*\nfile=ABI_DIR/BUILD_DIR/t_swapfsys\.exe\s+sys/bin/t_swapfsys\.exe\n.*", r".*\nfile=ABI_DIR/BUILD_DIR/t_localtime\.exe\s+sys/bin/t_localtime\.exe\n.*", # Some files where the MMP file has the PAGED or UNPAGED keywords. r".*\nfile=ABI_DIR/BUILD_DIR/t_pagestress\.exe\s+sys/bin/t_pagestress\.exe\n.*", r".*\nfile=ABI_DIR/BUILD_DIR/t_fsys\.exe\s+sys/bin/t_fsys\.exe\n.*", # Some files where the MMP file has the ROMTARGET or RAMTARGET keywords. r".*\ndata=ABI_DIR/BUILD_DIR/t_prel\.dll\s+/sys/bin/t_prel\.dll attrib=r\n.*", r".*\nfile=ABI_DIR/BUILD_DIR/t_sysbin\.exe\s+sys/bin/t_sysbin\.exe\n.*", r".*\ndata=ABI_DIR/BUILD_DIR/t_sysbin\.exe\s+/sys/bin/t_sysbin_ram\.exe attrib=r\n.*", r".*\nfile=ABI_DIR/BUILD_DIR/t_sysbin\.exe\s+/sys/bin/t_sysbina\.exe\n.*", r".*\nfile=ABI_DIR/BUILD_DIR/t_sysbin\.exe\s+/system/programs/t_sysbinb\.exe\n.*", # append_iby.flm additions from multiple START EXTENSION blocks r".*\ndata=../../f32test/server/t_file.cpp\s+Test/T_file.cpp\n.*", r".*\ndata=../../f32test/server/t_findcaptestfile.txt\s+/sys/bin/t_findcaptestfile.txt\n.*" ] t.mustnotmatch = [ # Try to detect file paths that contain two or more slashes in a row, # without flagging C++ style comments. r"\w//+\w", # Confirm that no exSymbian-format macros are present r"##MAIN##", r"##BUILD##" ] t.targets = [] t.warnings = 0 t.run() 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/rom/src/ongoing/group/romfile/armv5testn.iby</build>.*", r".*/epoc32/data/z/test/src_ongoing_romfile/armv5.auto.bat</build>.*", r".*/epoc32/data/z/test/src_ongoing_romfile/armv5.manual.bat</build>.*" ] t.mustnotmatch = [] t.warnings = 0 if t.onWindows else 2 t.run() t.name = "romfile_mmp_include_twice_general" t.command = "sbs -b $(EPOCROOT)/src/e32test/group/bld.inf " \ + "-b $(EPOCROOT)/src/falcon/test/bld.inf " \ + "-c armv5.test ROMFILE -m ${SBSMAKEFILE} -f ${SBSLOGFILE} " t.targets = [ "$(EPOCROOT)/epoc32/rom/src/e32test/group/armv5test.iby", "$(EPOCROOT)/epoc32/rom/src/e32test/group/armv5testn.iby" ] t.mustmatch = [] t.warnings = 0 t.run() t.name = "romfile_mmp_include_twice_content_exsymbian" t.command = "cat $(EPOCROOT)/epoc32/rom/src/e32test/group/armv5test.iby" t.targets = [] t.mustmatch = [ r".*\ndevice\[MAGIC\]=/epoc32/release/##KMAIN##/##BUILD##/d_nanowait\.ldd\s+sys/bin/d_nanowait\.ldd\n.*", r".*\ndevice\[MAGIC\]=/epoc32/release/##KMAIN##/##BUILD##/d_pagingexample_2_post.ldd\s+sys/bin/d_pagingexample_2_post.ldd\n.*", ] t.mustnotmatch = [ # These two files are from two mmp files that included in both bld.inf # They shouldn't be in the ROM r".*/d_medch.ldd\s.*" r".*/d_dma.ldd\s.*" ] t.warnings = 0 t.run() t.name = "romfile_mmp_include_twice_content_nokia" t.command = "cat $(EPOCROOT)/epoc32/rom/src/e32test/group/armv5testn.iby" t.targets = [] t.mustmatch = [ r".*\ndevice\[VARID\]=ABI_DIR/BUILD_DIR/d_nanowait\.ldd\s+sys/bin/d_nanowait\.ldd\n.*", r".*\ndevice\[VARID\]=ABI_DIR/BUILD_DIR/d_pagingexample_2_post.ldd\s+sys/bin/d_pagingexample_2_post.ldd\n.*", ] t.mustnotmatch = [ # These two files are from two mmp files that included in both bld.inf # They shouldn't be in the ROM r".*/d_medch.ldd\s.*" r".*/d_dma.ldd\s.*" ] t.warnings = 0 t.run() # Check armv5.auto.bat doesn't get generated with -p option t.name = "romfile_partial" t.command = "sbs -b $(EPOCROOT)/src/ongoing/group/romfile/other_name.inf " \ + "-c armv5.test ROMFILE -p t_rcache.mmp" t.antitargets = [ "$(EPOCROOT)/epoc32/data/z/test/src_ongoing_romfile/armv5.auto.bat" ] t.mustmatch = [] t.mustnotmatch = [] t.warnings = 0 if t.onWindows else 2 t.run() t.name = "romfile" t.print_result() return t
def run(): t = AntiTargetSmokeTest() t.usebash = True genericTargets = [ "$(EPOCROOT)/epoc32/release/armv5/udeb/dependency.exe", "$(EPOCROOT)/epoc32/release/armv5/udeb/dependency.exe.map", "$(EPOCROOT)/epoc32/release/armv5/urel/dependency.exe", "$(EPOCROOT)/epoc32/release/armv5/urel/dependency.exe.map", "$(EPOCROOT)/epoc32/release/winscw/urel/dependency.exe", "$(EPOCROOT)/epoc32/release/winscw/urel/dependency.exe.map", "$(EPOCROOT)/epoc32/release/winscw/udeb/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", "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/dependency.rsc", "$(EPOCROOT)/epoc32/include/main.rsg", "$(EPOCROOT)/epoc32/data/z/resource/apps/main.rsc", "$(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/$(HOSTPLATFORM32_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.name = "baseline_build" t.description = "Build a component with source and resource files that are dependent on header files exported in the build" t.command = """ 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.mustnotmatch = ["<warning>Missing dependency detected: .*</warning>"] t.targets = hostPlatformTargets t.run(hostPlatform) if t.result == AntiTargetSmokeTest.SKIP: hostPlatform = "linux" hostPlatformTargets = genericTargets + linuxTargets hostPlatformOffset = "$(HOSTPLATFORM32_DIR)/" t.targets = hostPlatformTargets t.run(hostPlatform) # Ensure we don't clean up from the previous build in the following two tests t.targets = [] # Core expected outcome for the following two tests t.mustmatch = [ ".*recipe name='compile' target='.*dependency\.o'", ".*recipe name='win32compile2object' target='.*dependency\.o'", ".*recipe name='compile2object' target='.*dependency\.o'", ".*recipe name='resourcecompile' target='.*dependency\.rsc'" ] t.countmatch = [[".*recipe name='compile'", 2], [".*recipe name='win32compile2object'", 2], [".*recipe name='compile2object'", 1], [".*recipe name='resourcecompile", 2]] t.name = "touched_header_dependencies" t.description = "Touch the exported header files and check that only the related source and resource files are re-built" t.command = """ sleep 1 touch $(EPOCROOT)/epoc32/include/dependency.h touch $(EPOCROOT)/epoc32/include/dependency.rh sbs -f- -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel""" t.run() t.name = "redundant_header_dependencies" t.description = """ Build the component again, but manipulate it so that (a) it no longer has a dependency on the exported header files and (b) the header files have been removed and (c) the header files are no longer exported. Check that only the related source and resource files are re-built""" t.command = """ cp smoke_suite/test_resources/dependencies/src/dependency2.cpp smoke_suite/test_resources/dependencies/dependency.cpp cp smoke_suite/test_resources/dependencies/src/dependency2.rss smoke_suite/test_resources/dependencies/dependency.rss rm -rf $(EPOCROOT)/epoc32/include/dependency.h rm -rf $(EPOCROOT)/epoc32/include/dependency.rh sbs -f- --noexport -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel""" t.mustnotmatch = [] # Note that the resource build does not exhibit a missing dependency as its dependency files are generated in a separate stage where # the target file isn't actually a target of that stage t.mustmatch.extend([ "<warning>Missing dependency detected: .*/epoc32/include/dependency.h</warning>" ]) t.warnings = 1 t.run() t.name = "invalid_dependency_files" t.description = "Invalidate dependency files, then make sure we can clean and re-build successfully" buildLocation = "$(EPOCROOT)/epoc32/build/" + BldInfFile.outputPathFragment( 'smoke_suite/test_resources/dependencies/bld.inf') + "/dependency_" # use one long bash command so that we can capture # the output in a way that isn't messed up with all the ordering confused. t.command = " echo \"making directory for logfile ${{SBSLOGFILE}}\" ; mkdir -p `dirname ${{SBSLOGFILE}} 2>/dev/null` ; {{ sleep 1 ; set -x ; \ touch smoke_suite/test_resources/dependencies/dependency.cpp; \ echo INVALIDATE_ARMV5_DEPENDENCY_FILE >> {0}/armv5/urel/dependency.o.d ; \ echo INVALIDATE_WINSCW_DEPENDENCY_FILE >> {0}/winscw/urel/dependency.o.d ;\ echo INVALIDATE_TOOLS2_DEPENDENCY_FILE >> {0}/dependency_exe/tools2/rel/{1}/dependency.o.d ;\ echo INVALIDATE_RESOURCE_DEPENDENCY_FILE >> {0}/dependency__resource_apps.rsc.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 ; }} > ${{SBSLOGFILE}} 2>&1; grep 'missing separator' ${{SBSLOGFILE}} ".format( buildLocation, hostPlatformOffset) # We expect an error from the first build due to the deliberate dependency file corruption t.mustmatch = [".*dependency.o.d:[0-9]+: \*\*\* missing separator"] t.countmatch = [] t.warnings = 0 t.errors = 0 t.targets = hostPlatformTargets t.run(hostPlatform) t.name = "no_depend_include" t.description = "Invalidate dependency files in order to confirm they aren't processed when --no-depend-include is used" buildLocation = "$(EPOCROOT)/epoc32/build/" + BldInfFile.outputPathFragment( 'smoke_suite/test_resources/dependencies/bld.inf') + "/dependency_" t.command = """ sleep 1 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/""" + hostPlatformOffset + """dependency.o.d sbs --no-depend-include -b smoke_suite/test_resources/dependencies/bld.inf -c default -c tools2_rel""" t.mustmatch = [] t.errors = 0 t.targets = hostPlatformTargets t.run(hostPlatform) t.name = "no_depend_generate" t.description = "Invalidate and remove dependency files in order to confirm they are neither included nor re-generated when --no-depend-generate is used" buildLocation = "$(EPOCROOT)/epoc32/build/" + BldInfFile.outputPathFragment( 'smoke_suite/test_resources/dependencies/bld.inf') + "/dependency_" t.command = """ sleep 1 touch smoke_suite/test_resources/dependencies/dependency.cpp 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/""" + 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/" + hostPlatformOffset + "main.o.d" ] t.targets = hostPlatformTargets t.run(hostPlatform) # clean-up os.remove("smoke_suite/test_resources/dependencies/dependency.cpp") os.remove("smoke_suite/test_resources/dependencies/dependency.rss") t.name = "dependencies" t.print_result() return t
def run(): t = AntiTargetSmokeTest() t.usebash = True command = "sbs -b smoke_suite/test_resources/simple_dll/pbld.inf -c %s -f -" maintargets = [ "$(EPOCROOT)/epoc32/release/%s/udeb/createstaticpdll.dll.sym", "$(EPOCROOT)/epoc32/release/%s/urel/createstaticpdll.dll.sym", "$(EPOCROOT)/epoc32/release/%s/udeb/createstaticpdll.dll", "$(EPOCROOT)/epoc32/release/%s/urel/createstaticpdll.dll" ] armv5targets = [ "$(EPOCROOT)/epoc32/release/%s/lib/createstaticpdll.dso", "$(EPOCROOT)/epoc32/release/%s/lib/createstaticpdll{000a0000}.dso" ] buildtargets = [ "createstaticpdll_dll/%s/udeb/CreateStaticDLL.o", "createstaticpdll_dll/%s/urel/CreateStaticDLL.o" ] mustmatch = [ r".*\busrt\d_\d\.lib\b.*", r".*\bscppnwdl\.dso\b.*" ] mustnotmatch = [ ".*ksrt.*" ] t.id = "0109a" t.name = "pdll_armv5_rvct" t.command = command % "armv5" t.targets = map(lambda p: p % "armv5", maintargets + armv5targets)[:] # Shallow, as we optionally extend later and then re-use t.addbuildtargets('smoke_suite/test_resources/simple_dll/pbld.inf', map(lambda p: p % "armv5", buildtargets)) t.mustmatch = mustmatch t.mustnotmatch = mustnotmatch t.run() t.id = "0109b" t.name = "pdll_armv5_clean" t.command = command % "armv5" + " clean" t.targets = [] t.mustmatch = [] t.mustnotmatch = [] t.run() t.id = "0109c" t.name = "pdll_armv5_gcce" t.command = command % "gcce_armv5" t.targets = map(lambda p: p % "armv5", maintargets + armv5targets) t.addbuildtargets('smoke_suite/test_resources/simple_dll/pbld.inf', map(lambda p: p % "armv5", buildtargets)) t.mustmatch = mustmatch t.mustnotmatch = mustnotmatch t.run() t.id = "0109d" t.name = "pdll_armv5_gcce_clean" t.command = command % "gcce_armv5" + " clean" t.targets = [] t.mustmatch = [] t.mustnotmatch = [] t.run() t.id = "0109e" t.name = "pdll_armv7_rvct" t.command = command % "armv7" t.targets = map(lambda p: p % "armv7", maintargets)[:] # Shallow, as we optionally extend later and then re-use t.addbuildtargets('smoke_suite/test_resources/simple_dll/pbld.inf', map(lambda p: p % "armv7", buildtargets)) t.mustmatch = mustmatch t.mustnotmatch = mustnotmatch t.run() t.id = "0109f" t.name = "pdll_armv7_clean" t.command = command % "armv7" + " clean" t.targets = [] t.mustmatch = [] t.mustnotmatch = [] t.run() t.id = "0109g" t.name = "pdll_armv7_gcce" t.command = command % "arm.v7.udeb.gcce4_3_2 -c arm.v7.urel.gcce4_3_2" t.targets = map(lambda p: p % "armv7", maintargets) t.addbuildtargets('smoke_suite/test_resources/simple_dll/pbld.inf', map(lambda p: p % "armv7", buildtargets)) t.mustmatch = mustmatch t.mustnotmatch = mustnotmatch t.run() t.id = "109" t.name = "pdll_arm" t.print_result() return t