def run(): t = SmokeTest() t.name = "annofile2log_copy_from_log" t.description = "test workaround for log corruption from a make engine whose name begins with 'e'" command = 'cd smoke_suite/test_resources/annofile2log && ( FROMANNO="`mktemp`" ; bzip2 -dc {test_file_basename}.anno.bz2 ' \ ' | python testanno2log.py >"${{FROMANNO}}" && FROMSTDOUT="`mktemp`"; bzip2 -dc {test_file_basename}.stdout.bz2 > ' \ '"${{FROMSTDOUT}}" && diff -wB "${{FROMANNO}}" "${{FROMSTDOUT}}"; RET=$? ; rm "${{FROMANNO}}" "${{FROMSTDOUT}}"; exit $RET )' t.usebash = True t.errors = 0 t.returncode = 0 t.exceptions = 0 t.command = command.format(test_file_basename = "scrubbed_ncp_dfs_resource") t.run() t.name = "annofile2log_new_format_annofile" t.description = "test new format of annofile" t.usebash = True t.errors = 0 t.returncode = 0 t.exceptions = 0 t.command = command.format(test_file_basename = "scrubbed_ncp_dfs_resource_new") t.run() t.print_result() return t
def run(): t = SmokeTest() command = "sbs -k -b smoke_suite/test_resources/simple/longcompiles.inf -c armv7_urel{variant} -c winscw_udeb{variant} -c arm.v5.urel.gcce4_4_1{variant}" talon_warning = ".*Command line length '\d+' exceeds the shell limit on this system of '\d+'. If this recipe is a compile, try using the '.use_compilation_command_file' variant to reduce overall command line length." targets = [ "$(EPOCROOT)/epoc32/release/armv7/urel/longcompiles.exe", "$(EPOCROOT)/epoc32/release/winscw/udeb/longcompiles.exe", "$(EPOCROOT)/epoc32/release/armv5/urel/longcompiles.exe", ] t.name = "longcompile_no_command_file" t.description = """ Confirm OS-specific behaviour on massive compilation command lines. On Linux, all should be well, but on Windows the compile will fail together with a talon warning with some potentially useful advice. """ t.command = command.format(variant="") if t.onWindows: t.targets = [] t.mustmatch_singleline = [talon_warning] t.warnings = 24 t.errors = 1 t.returncode = 1 else: t.targets = targets t.mustnotmatch_singleline = [talon_warning] t.run() t.name = "longcompile_command_file" t.description = """ Confirm that a command file is used with the .use_compilation_command_file variant, and that the build succeeds on all host OS platforms. """ t.command = command.format(variant=".use_compilation_command_file") t.targets = targets t.addbuildtargets( "smoke_suite/test_resources/simple/longcompiles.inf", [ "longcompiles_exe/armv7/urel/cc.cmdfile", "longcompiles_exe/winscw/udeb/cc.cmdfile", "longcompiles_exe/armv5/urel/cc.cmdfile", ], ) t.mustmatch_singleline = [] t.mustnotmatch_singleline = [] t.warnings = 0 t.errors = 0 t.returncode = 0 t.run() t.name = "longcompiles" t.print_result() return t
def run(): t = SmokeTest() t.description = "Trace Compiler Whatlog Clean" t.id = "112a" t.name = "tracecompiler_whatlog_clean" t.usebash = True t.command = "sbs -b smoke_suite/test_resources/tracecompiler/testTC/group/bld2.inf -c armv5.tracecompiler CLEAN" t.run() t = CheckWhatSmokeTest() t.description = "Trace Compiler Whatlog test" t.id = "112b" t.name = "tracecompiler_whatlog" t.usebash = True t.command = "sbs -b smoke_suite/test_resources/tracecompiler/testTC/group/bld2.inf -c armv5.tracecompiler -m ${SBSMAKEFILE} -f ${SBSLOGFILE} && cat ${SBSLOGFILE}" t.hostossensitive = False t.regexlinefilter = re.compile("^<(whatlog|export|build>|resource>|bitmap>)") t.targets = [ "$(EPOCROOT)/epoc32/release/armv5/lib/testTC.dso", "$(EPOCROOT)/epoc32/release/armv5/lib/testTC{000a0000}.dso", "$(EPOCROOT)/epoc32/release/armv5/udeb/testTC.dll", "$(EPOCROOT)/epoc32/release/armv5/udeb/testTC.dll.map", "$(EPOCROOT)/epoc32/release/armv5/urel/testTC.dll", "$(EPOCROOT)/epoc32/release/armv5/urel/testTC.dll.map", "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/wlanhwinitTraces.h", "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/wlanhwinitmainTraces.h", "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/wlanhwinitpermparserTraces.h", "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/fixed_id.definitions", "$(EPOCROOT)/epoc32/ost_dictionaries/test_TC_0x1000008d_Dictionary.xml", "$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/test_TC_0x1000008d_TraceDefinitions.h" ] t.stdout = [ "<whatlog bldinf='$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/group/bld2.inf' mmp='$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/group/test.TC.mmp' config='armv5_urel.tracecompiler'>", "<whatlog bldinf='$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/group/bld2.inf' mmp='$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/group/test.TC.mmp' config='armv5_udeb.tracecompiler'>", "<build>$(EPOCROOT)/epoc32/release/armv5/lib/testTC.dso</build>", "<build>$(EPOCROOT)/epoc32/release/armv5/lib/testTC{000a0000}.dso</build>", "<build>$(EPOCROOT)/epoc32/release/armv5/udeb/testTC.dll</build>", "<build>$(EPOCROOT)/epoc32/release/armv5/udeb/testTC.dll.map</build>", "<build>$(EPOCROOT)/epoc32/release/armv5/urel/testTC.dll</build>", "<build>$(EPOCROOT)/epoc32/release/armv5/urel/testTC.dll.map</build>", "<build>$(EPOCROOT)/epoc32/ost_dictionaries/test_TC_0x1000008d_Dictionary.xml</build>", "<build>$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/test_TC_0x1000008d_TraceDefinitions.h</build>" ] t.run("linux") if t.result == CheckWhatSmokeTest.SKIP: t.run("windows") t.id = "112" return t
def run(): t = SmokeTest() t.name = "slim_debug" t.description = """Exercise the slim_debug variant, checking that command line arguments are applied selectively.""" t.usebash = True t.command = "sbs -b smoke_suite/test_resources/simple_dll/bld.inf -c armv5.slimdebug -f-" t.targets = [ "$(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" ] t.addbuildtargets('smoke_suite/test_resources/simple_dll/bld.inf', [ "createstaticdll_dll/armv5/udeb/CreateStaticDLL.o", "createstaticdll_dll/armv5/urel/CreateStaticDLL.o" ]) t.mustnotmatch_singleline = ["\+.*armcc.*--no_debug_macros --remove_unneeded_entities.*--DNDEBUG"] t.mustmatch_singleline = ["\+.*armcc.*--no_debug_macros --remove_unneeded_entities.*-D_DEBUG"] t.run() return t
def run(): t = SmokeTest() t.id = "2" t.name = "exe_armv5_filtered" t.description = "Run exe_armv5 with a customised filter. Will create then" \ + " remove filter file" t.usebash = True t.command = "cp -f smoke_suite/test_resources/filter_test/testfilter.py ../python/plugins/testfilter.py " \ "&& chmod 600 ../python/plugins/testfilter.py " \ "&& sbs -b smoke_suite/test_resources/simple/bld.inf -c armv5 --filters=TestFilter " \ "&& rm -f ../python/plugins/testfilter.py*" t.targets = [ "$(EPOCROOT)/epoc32/release/armv5/udeb/test.exe", "$(EPOCROOT)/epoc32/release/armv5/udeb/test.exe.map", "$(EPOCROOT)/epoc32/release/armv5/urel/test.exe", "$(EPOCROOT)/epoc32/release/armv5/urel/test.exe.map" ] t.addbuildtargets('smoke_suite/test_resources/simple/bld.inf', [ "test_/armv5/udeb/test.o", "test_/armv5/urel/test.o" ]) t.mustmatch = [ ".*Test Passed!.*" ] t.run() return t
def run(): t = SmokeTest() t.description = "test mmpkeyword: traces" t.id = "108a" t.name = "traces_mmpkeyword" t.command = "sbs -b smoke_suite/test_resources/tracecompiler/traceon/group/bld.inf -c armv5.tracecompiler" t.targets = [ "$(EPOCROOT)/epoc32/release/armv5/udeb/traceon.exe", "$(EPOCROOT)/epoc32/release/armv5/urel/traceon.exe", "$(EPOCROOT)/epoc32/release/armv5/udeb/traces_keyword.exe", "$(EPOCROOT)/epoc32/release/armv5/urel/traces_keyword.exe", "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/traceon/traces/traceon_exe/traceonTraces.h", "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/traceon/traces/traces_keyword_exe/traces_keywordTraces.h", "$(EPOCROOT)/epoc32/ost_dictionaries/traceon_exe_0x11100010_Dictionary.xml", "$(EPOCROOT)/epoc32/ost_dictionaries/traces_keyword_exe_0x11100011_Dictionary.xml", "$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/traceon_exe_0x11100010_TraceDefinitions.h", "$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/traces_keyword_exe_0x11100011_TraceDefinitions.h" ] t.addbuildtargets('smoke_suite/test_resources/tracecompiler/traceon/group/bld.inf', [ "traceon_exe/armv5/udeb/traceon.o", "traceon_exe/armv5/urel/traceon.o", "traceon_exe/tracecompile_traceon_exe_11100010.done", "traces_keyword_exe/armv5/udeb/traces_keyword.o", "traces_keyword_exe/armv5/urel/traces_keyword.o", "traces_keyword_exe/tracecompile_traces_keyword_exe_11100011.done", ]) t.run() t.id = "108" t.name = "tracecompiler_new" return t
def run(): t = SmokeTest() t.description = "Check that ARM toolchain specific macros are used in both metadata and source processing." t.warnings = -1 toolchains = { 'rvct2_2': ['ARMCC', 'ARMCC_2', 'ARMCC_2_2', '__ARMCC__', '__ARMCC_2__', '__ARMCC_2_2__'], 'rvct4_0': ['ARMCC', 'ARMCC_4', 'ARMCC_4_0', '__ARMCC__', '__ARMCC_4__' , '__ARMCC_4_0__'], 'gcce4_3_2': ['GCCE', 'GCCE_4', 'GCCE_4_3', '__GCCE__', '__GCCE_4__' , '__GCCE_4_3__'], 'gcce4_3_3': ['GCCE', 'GCCE_4', 'GCCE_4_3', '__GCCE__', '__GCCE_4__' , '__GCCE_4_3__'], 'gcce4_4_1': ['GCCE', 'GCCE_4', 'GCCE_4_4', '__GCCE__', '__GCCE_4__' , '__GCCE_4_4__'], 'gcce4_5_1': ['GCCE', 'GCCE_4', 'GCCE_4_5', '__GCCE__', '__GCCE_4__' , '__GCCE_4_5__'] } rootname = "toolchain_macros_armv5_{0}_{1}" rootcommand = "sbs -b smoke_suite/test_resources/toolchain_macros/bld.inf -c arm.v5.urel." macromatch = ": #warning( directive:)? {0}( \[-Wcpp\])?(</warning>)?$" for toolchain in sorted(toolchains.keys()): t.name = rootname.format(toolchain, "clean") t.command = rootcommand + toolchain + " clean" t.mustmatch_singleline = [] t.run() t.name = rootname.format(toolchain, "build") t.command = rootcommand + toolchain mustmatch = [] for macro in toolchains[toolchain]: mustmatch.append(macromatch.format(macro)) t.mustmatch_singleline = mustmatch t.run() t.name = "toolchain_macros" t.print_result() return t
def run(): commonbuildfiles = [ "createstaticdll_dll/armv5/urel/CreateStaticDLL.o", "createstaticdll_dll/armv5/urel/CreateStaticDLL.o.d", "createstaticdll_dll/winscw/urel/CreateStaticDLL.o", "createstaticdll_dll/winscw/urel/CreateStaticDLL.o.d", "createstaticdll_dll/winscw/urel/createstaticdll.UID.CPP", "createstaticdll_dll/winscw/urel/createstaticdll_UID_.o.d" ] t = SmokeTest() t.id = "82" t.name = "output_control" t.description = "Test building intermediate files into a location other than $EPOCROOT/epoc32/build. Use SBS_BUILD_DIR. environment variable." t.sbs_build_dir = environ['EPOCROOT'].replace("\\","/").rstrip("/") + '/anotherbuilddir' t.environ['SBS_BUILD_DIR'] = t.sbs_build_dir t.command = "sbs -b smoke_suite/test_resources/simple_dll/bld.inf -c armv5_urel -c winscw_urel" t.targets = [ "$(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/urel/createstaticdll.dll", "$(EPOCROOT)/epoc32/release/winscw/urel/createstaticdll.dll", "$(EPOCROOT)/epoc32/release/winscw/urel/createstaticdll.dll.map" ] t.addbuildtargets('smoke_suite/test_resources/simple_dll/bld.inf', commonbuildfiles) t.run() return t
def run(): t = SmokeTest() t.usebash = True t.description = "Test that dependency crunching for resource dependency files produces expected output" t.id = "43562999" t.name = "depcrunch" t.command = "python $SBS_HOME/bin/depcrunch.py --extensions mbg,rsg --assume EPOCROOT < smoke_suite/test_resources/depcrunch/dep2.rpp.d" t.mustmatch_multiline = [ r"EPOCROOT/epoc32/build/resource/c_98665870f0168225/dependentresource_/dependentresource_dependentresource_sc.rpp: \\\n"+ r" EPOCROOT/testresource1.mbg \\\n"+ r" EPOCROOT/testresource2.rsg \\\n"+ r" EPOCROOT/testresource3.rsg \\\n"+ r" EPOCROOT/testresource4.mbg \\\n"+ r" EPOCROOT/testresource5.rsg \\\n"+ r" EPOCROOT/testresource6.mbg \\\n"+ r" EPOCROOT/testresource7.rsg \\\n"+ r" EPOCROOT/testresource8.mbg \\\n"+ r" EPOCROOT/testresource9.rsg \n" ] t.run() t.print_result() return t
def run(): t = SmokeTest() t.id = "71" t.name = "metadep" t.description = """Tests metadata dependency generation. Changes to bld.infs and mmps can be detected.""" t.usebash = True t.command = """export SBSLOGFILE SBSMAKEFILE; bash smoke_suite/test_resources/metadep.sh 2>&1""" t.targets = [ ] t.mustmatch_multiline = [ """.*Step 1 .*no warnings or errors.* sbs: build log in.* \+ sleep 1.* .*make -rf .*epoc32/build/metadata_all.mk.* .*make.*epoc32/build/metadata_all.mk. is up to date.* Step 2 .* .*RE-RUNNING SBS with previous parameters.* Step 3 .* .*RE-RUNNING SBS with previous parameters.* .*RE-RUNNING SBS with previous parameters.*""" ] t.mustnotmatch_multiline = [ """RE-RUNNING SBS with previous parameters.* RE-RUNNING SBS with previous parameters.* RE-RUNNING SBS with previous parameters.* RE-RUNNING SBS with previous parameters.*""" ] t.run() return t
def run(): t = SmokeTest() t.usebash = True t.description = "Test that a timing log is created and contains total parse and build durations" t.id = "0103b" t.name = "timing_on" t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf" + \ " --filters=FilterLogfile,FilterTiming -f ${SBSLOGFILE} && " + \ "grep progress:duration ${SBSLOGFILE}.timings" t.mustmatch = [ "^<progress:duration object_type='layer' task='parse' key='.*' duration='\d+.\d+' />$", "^<progress:duration object_type='layer' task='build' key='.*' duration='\d+.\d+' />$", "^<progress:duration object_type='all' task='all' key='all' duration='\d+.\d+' />$" ] t.mustnotmatch = [] t.run() t.id = "103" t.name = "timing" t.print_result() return t
def run(): t = SmokeTest() t.name = "dll_x86" t.description = "Build a basic DLL TARGETTYPE for x86" t.command = "sbs -b smoke_suite/test_resources/simple_dll/bld.inf -c x86" t.targets = [ "$(EPOCROOT)/epoc32/release/x86/udeb/createstaticdll.dll", "$(EPOCROOT)/epoc32/release/x86/udeb/createstaticdll.dll.map", "$(EPOCROOT)/epoc32/release/x86/urel/createstaticdll.dll", "$(EPOCROOT)/epoc32/release/x86/urel/createstaticdll.dll.map", "$(EPOCROOT)/epoc32/release/x86/lib/createstaticdll.lib", "$(EPOCROOT)/epoc32/release/x86/lib/createstaticdll{000a0000}.lib" ] t.addbuildtargets('smoke_suite/test_resources/simple_dll/bld.inf', [ "createstaticdll_dll/x86/udeb/CreateStaticDLL.o", "createstaticdll_dll/x86/udeb/CreateStaticDLL.o.d", "createstaticdll_dll/x86/urel/CreateStaticDLL.o", "createstaticdll_dll/x86/urel/CreateStaticDLL.o.d", "createstaticdll_dll/x86/udeb/createstaticdll_udeb_objects.via", "createstaticdll_dll/x86/urel/createstaticdll_urel_objects.via", ["createstaticdll_dll/x86/udeb/createstaticdll.prep", "createstaticdll_dll/x86/urel/createstaticdll.prep"], ["createstaticdll_dll/x86/udeb/createstaticdll.lib.exp", "createstaticdll_dll/x86/urel/createstaticdll.lib.exp"] ]) t.run("windows") return t
def run(): t = SmokeTest() t.name = "preprocess" t.usebash = True t.description = "Exercise the global PREPROCESS target" # Build component normally first for one config - resource generate .rsg files are #included in "straight" source # The PREPROCESS target does not resolve resource dependencies, but the test component is selected on the basis # that it will support the generation of resource .pre files in the future. addConfigs = "" addTargets = [] if t.onWindows: addConfigs = "-c x86_udeb" addTargets = [ "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_Application.cpp.x86.udeb.helloworld.exe.pre", "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_AppUi.cpp.x86.udeb.helloworld.exe.pre", "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_AppView.cpp.x86.udeb.helloworld.exe.pre", "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_Document.cpp.x86.udeb.helloworld.exe.pre", "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_Main.cpp.x86.udeb.helloworld.exe.pre" ] t.command = """ sbs -b smoke_suite/test_resources/simple_gui/Bld.inf -c armv5_urel && sbs -b smoke_suite/test_resources/simple_gui/Bld.inf -c armv5 -c winscw_urel -c armv7_udeb -c arm.v7.urel.gcce4_4_1 {0} preprocess """.format(addConfigs) t.targets = [ "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_Application.cpp.armv5.udeb.helloworld.exe.pre", "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_Application.cpp.armv5.urel.helloworld.exe.pre", "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_AppUi.cpp.armv5.udeb.helloworld.exe.pre", "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_AppUi.cpp.armv5.urel.helloworld.exe.pre", "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_AppView.cpp.armv5.udeb.helloworld.exe.pre", "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_AppView.cpp.armv5.urel.helloworld.exe.pre", "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_Document.cpp.armv5.udeb.helloworld.exe.pre", "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_Document.cpp.armv5.urel.helloworld.exe.pre", "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_Main.cpp.armv5.udeb.helloworld.exe.pre", "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_Main.cpp.armv5.urel.helloworld.exe.pre", "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_Application.cpp.winscw.urel.helloworld.exe.pre", "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_AppUi.cpp.winscw.urel.helloworld.exe.pre", "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_AppView.cpp.winscw.urel.helloworld.exe.pre", "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_Document.cpp.winscw.urel.helloworld.exe.pre", "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_Main.cpp.winscw.urel.helloworld.exe.pre", "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_Application.cpp.armv7.udeb.helloworld.exe.pre", "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_AppUi.cpp.armv7.udeb.helloworld.exe.pre", "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_AppView.cpp.armv7.udeb.helloworld.exe.pre", "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_Document.cpp.armv7.udeb.helloworld.exe.pre", "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_Main.cpp.armv7.udeb.helloworld.exe.pre", "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_Application.cpp.armv7.urel.helloworld.exe.pre", "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_AppUi.cpp.armv7.urel.helloworld.exe.pre", "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_AppView.cpp.armv7.urel.helloworld.exe.pre", "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_Document.cpp.armv7.urel.helloworld.exe.pre", "$(SBS_HOME)/test/smoke_suite/test_resources/simple_gui/HelloWorld_Main.cpp.armv7.urel.helloworld.exe.pre" ] + addTargets t.run() # Explicit clean-up due to the source tree nature of the generated files t.clean() return t
def run(): t = SmokeTest() t.name = "resource_once" t.description = "Ensure we only generate the resource header once even when there are many languages. Make sure that the right language (96) is used for the headerfile." t.command = "sbs -b smoke_suite/test_resources/resource/group/simple.inf -c winscw_udeb -m ${SBSMAKEFILE} -f ${SBSLOGFILE}; XX=$?; cat ${SBSLOGFILE}; exit $XX" t.usebash = True t.targets = [ "$(EPOCROOT)/epoc32/include/testresource.hrh", "$(EPOCROOT)/epoc32/include/testresource_badef.rh", "$(EPOCROOT)/epoc32/data/z/resource/testresource/testresource.rsc", "$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/testresource/testresource.rsc", "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/testresource/testresource.rsc", "$(EPOCROOT)/epoc32/data/z/resource/testresource/testresource.r37", "$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/testresource/testresource.r37", "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/testresource/testresource.r37", "$(EPOCROOT)/epoc32/data/z/resource/testresource/testresource.r94", "$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/testresource/testresource.r94", "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/testresource/testresource.r94", "$(EPOCROOT)/epoc32/data/z/resource/testresource/testresource.r96", "$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/testresource/testresource.r96", "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/testresource/testresource.r96", "$(EPOCROOT)/epoc32/include/testresource.rsg", "$(EPOCROOT)/epoc32/release/winscw/udeb/testresource.exe" ] t.countmatch = [["rcomp.*-h.*rsg.*r96",1], # must see r96 once ["rcomp.*-h.*rsg",1]] # must not see any other language t.run() t.print_result() return t
def run(): t = SmokeTest() t.id = "78" t.name = "dll_winscw_win32resource" t.description = """Test the construction of a custom WINSCW DLL containing Windows resources specified by win32_resource.""" t.command = "sbs -b smoke_suite/test_resources/simple_dll/win32resource/bld.inf -c winscw" t.targets = [ "$(EPOCROOT)/epoc32/release/winscw/udeb/createstaticdll.lib", "$(EPOCROOT)/epoc32/release/winscw/udeb/createstaticdll.dll", "$(EPOCROOT)/epoc32/release/winscw/urel/createstaticdll.dll", "$(EPOCROOT)/epoc32/release/winscw/urel/createstaticdll.dll.map" ] t.addbuildtargets('smoke_suite/test_resources/simple_dll/win32resource/bld.inf', [ "createstaticdll_dll/winscw/udeb/CreateStaticDLL.o", "createstaticdll_dll/winscw/udeb/createstaticdll.UID.CPP", "createstaticdll_dll/winscw/udeb/createstaticdll_UID_.o", "createstaticdll_dll/winscw/udeb/gui.res", "createstaticdll_dll/winscw/udeb/gui.res.d", "createstaticdll_dll/winscw/urel/CreateStaticDLL.o", "createstaticdll_dll/winscw/urel/createstaticdll.UID.CPP", "createstaticdll_dll/winscw/urel/createstaticdll_UID_.o", "createstaticdll_dll/winscw/urel/gui.res", "createstaticdll_dll/winscw/urel/gui.res.d", ]) t.run() return t
def run(): t = SmokeTest() t.usebash = True if "SBS_ELF2E32" in os.environ: elf2e32 = os.environ["SBS_ELF2E32"] elif sys.platform.startswith("win"): elf2e32 = "$(EPOCROOT)/epoc32/tools/elf2e32.exe" else: elf2e32 = "$(EPOCROOT)/epoc32/tools/elf2e32" description = """This test attempts to check that an exe gets the capabilities that we requested. It's ARM specific since it uses elf2e32. Tries to demonstrate capabilties being turned off then on in the mmp.""" command = "sbs -b smoke_suite/test_resources/simple/capability.inf -c %s -m ${SBSMAKEFILE} -f ${SBSLOGFILE} && " + \ elf2e32 + " --dump=s --e32input=$(EPOCROOT)/epoc32/release/armv5/urel/test_capability.exe" targets = [ "$(EPOCROOT)/epoc32/release/armv5/urel/test_capability.exe", "$(EPOCROOT)/epoc32/release/armv5/urel/test_capability.exe.map" ] buildtargets = [ ] mustmatch = [ "\s*Secure ID: 10003a5c$", "\s*Vendor ID: 00000000$", "\s*Capabilities: 00000000 000fffbf$", "\s*CommDD$", "\s*PowerMgmt$", "\s*MultimediaDD$", "\s*ReadDeviceData$", "\s*WriteDeviceData$", "\s*TrustedUI$", "\s*DiskAdmin$", "\s*NetworkControl$", "\s*AllFiles$", "\s*SwEvent$", "\s*NetworkServices$", "\s*LocalServices$", "\s*ReadUserData$", "\s*WriteUserData$", "\s*Location$", "\s*SurroundingsDD$", "\s*UserEnvironment$", "\s*TCB$" ] mustnotmatch = [ "DRM" ] warnings = 0 t.id = "0107" t.name = "capability_arm" t.description = description t.command = command % "arm.v5.urel.gcce4_4_1" t.targets = targets t.mustmatch = mustmatch t.mustnotmatch = mustnotmatch t.warnings = warnings t.run() return t
def run(): t = SmokeTest() t.id = "80" t.name = "sbs_with_nonexisting_bldinf" t.description = "Test if sbs generates warning if invoked without bld.inf specified i.e. using default bld.inf which doesn't exist" t.command = "mkdir ${EPOCROOT}/emptydir; rm ${EPOCROOT}/emptydir/*; cd ${EPOCROOT}/emptydir; sbs -f ${SBSLOGFILE} -m {SBSMAKEFILE}" t.usebash = True t.warnings = 1 t.run() return t
def run(): t = SmokeTest() t.id = "46" t.name = "wrong_projectname" t.description = "Test -p with wrong project name" t.command = "sbs -b smoke_suite/test_resources/basics/helloworld/Bld.inf " \ + "-p wrongname1.mmp -p wrongname2.mmp" t.targets = [] t.warnings = 2 # One for armv5, one for winscw. t.run() return t
def run(): t = SmokeTest() t.id = "50" t.name = "sysdef_dud" t.description = "Test an invalid system_definition.xml file" t.command = "sbs -s " + "smoke_suite/test_resources/sysdef/system_definition_dud.xml" t.targets = [] t.errors = 1 t.returncode = 1 t.run() return t
def run(): t = SmokeTest() t.name = "sbs_with_nonexisting_bldinf" t.description = "Test if sbs generates warning if invoked without bld.inf specified i.e. using default bld.inf which doesn't exist" t.command = "mkdir ${EPOCROOT}/emptydir; rm ${EPOCROOT}/emptydir/*; cd ${EPOCROOT}/emptydir; sbs -f ${SBSLOGFILE} -m {SBSMAKEFILE}" t.usebash = True t.warnings = 1 t.run() t.name = "sbs_with_nonexisting_bldinf_cli" t.description = "Test if sbs generates an error if invoked with a bad -b option" t.command = "sbs -b none.inf" t.usebash = False t.errors = 1 t.warnings = 0 t.returncode = 1 t.mustmatch = ["sbs: error: build info file does not exist \(component .*none.inf\)"] t.run() t.print_result() return t
def run(): t = SmokeTest() t.name="environment_native" t.description = """Checks that if you set SBS_HOME this is ignored""" t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf -c arm.v5.udeb.gcce4_4_1" t.targets = [ "$(EPOCROOT)/epoc32/release/armv5/udeb/test.exe" ] t.environ['SBS_HOME'] = '/does/not/exist' t.run() if t.onWindows: t.name="environment_cygwin_bash" t.usebash = True t.description = """Checks that if you set SBS_HOME this is ignored on Cygwin""" t.run() t.name = "environment" t.print_result() return t
def run(): t = SmokeTest() t.id = "81" t.name = "export_multi" t.description = "Test that the export section only gets included once even if all platforms are selected (see DPDEF138366)" # Note I'm not including 'tools' to avoid a dependency on MSVC6 # Given this test will not be necessary once the export section is removed from the make files anyway, I'm not too worried. t.command = "sbs -b smoke_suite/test_resources/basics/helloworld/Bld.inf -c winscw -c armv5 -c tools2 -c armv7 -c gccxml EXPORT" t.mustnotmatch = [ ".*warning: overriding commands for target.*", ".*warning: ignoring old commands for target.*" ] t.run() return t
def run(): t = SmokeTest() t.id = "90" 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 default UID2 settings for PLUGIN3 TARGETTYPEs and default resource generation locations for both PLUGIN and PLUGIN3.""" t.usebash = True 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" ] 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 = SmokeTest() t.name = "implib_x86" t.description = "Build a basic IMPLIB TARGETTYPE for x86" t.command = "sbs -b smoke_suite/test_resources/simple_implib/bld.inf -c x86" t.targets = [ "$(EPOCROOT)/epoc32/release/x86/lib/simple_implib.lib" ] t.addbuildtargets("smoke_suite/test_resources/simple_implib/bld.inf", [ ["simple_implib_lib/x86/udeb/simple_implib.prep", "simple_implib_lib/x86/urel/simple_implib.prep"], ]) t.run("windows") return t
def run(): t = SmokeTest() t.description = """Test the 'expgen' stage with different combinations of compiler (RVCT and GCC-E) and elf2e32 version (with and without --asm option).""" t.usebash = True bld_inf = "smoke_suite/test_resources/custom_dll/bld.inf" old_elf2e32 = "$(SBS_HOME)/test/smoke_suite/test_resources/custom_dll/elf2e32_old" if t.onWindows: old_elf2e32 += ".exe" # Command templates for using the new and the old version of elf2e32, # respectively. The new version supports the --asm option. new_cmd = "sbs -b " + bld_inf + " -c {0}" old_cmd = "SBS_ELF2E32=" + old_elf2e32 + " " + new_cmd t.targets = [ "$(EPOCROOT)/epoc32/release/armv5/lib/customdll.dso", "$(EPOCROOT)/epoc32/release/armv5/lib/customdll{000a0000}.dso", "$(EPOCROOT)/epoc32/release/armv5/udeb/customdll.dll", "$(EPOCROOT)/epoc32/release/armv5/udeb/customdll.dll.map", "$(EPOCROOT)/epoc32/release/armv5/urel/customdll.dll", "$(EPOCROOT)/epoc32/release/armv5/urel/customdll.dll.map" ] # This ensures that the "expgen" stage is executed for each call to run(). t.addbuildtargets(bld_inf, [ "customdll_dll/armv5/customdll{000a0000}.s", "customdll_dll/armv5/customdll{000a0000}.exp"]) t.name = "custom_dll_rvct_new_elf2e32" t.command = new_cmd.format("armv5") t.run() t.name = "custom_dll_rvct_old_elf2e32" t.command = old_cmd.format("armv5") t.run() t.name = "custom_dll_gcce_new_elf2e32" t.command = new_cmd.format("gcce_armv5") t.run() t.name = "custom_dll" t.print_result() return t
def run(): generate_files() t = SmokeTest() t.id = "1" t.name = "parse_time_exports_mmps" t.description = """Test to measure time taken to parse a large number of exports and mmps""" t.command = "sbs -b timing_tests/test_resources/parse_time/bld.inf -n " + \ "-c armv5_urel --toolcheck=off --timing" t.run() delete_files() return t
def run(): t = SmokeTest() t.name = "cli_makevar_overide" t.id = "0117" t.description = "Attempt to override a makefile var at the command line." t.usebash = True t.command = "sbs -b smoke_suite/test_resources/basics/helloworld/Bld.inf REALLYCLEAN -m ${SBSMAKEFILE} -f ${SBSLOGFILE} HOSTPLATFORM_DIR=unlikelydir" t.mustmatch = ["sbs: warning: CLEAN, CLEANEXPORT and a REALLYCLEAN should not be combined with other targets as the result is unpredictable"] t.warnings = 1 t.run() return t
def run(): t = SmokeTest() t.usebash = True result = SmokeTest.PASS description = """This test covers parallel parsing.""" command = "cd $(SBS_HOME)/test/smoke_suite/test_resources/pp/ && sbs --command=$(SBS_HOME)/test/smoke_suite/test_resources/pp/ppbldinf_commandfile -c armv5 -c winscw --pp=on --noexport -m ${SBSMAKEFILE} -f - | grep recipe " mmpcount = 10 # how many mmps in this parallel parsing test target_templ = [ "$(EPOCROOT)/epoc32/release/armv5/udeb/test_pp#.exe", "$(EPOCROOT)/epoc32/release/armv5/udeb/test_pp#.exe.map", "$(EPOCROOT)/epoc32/release/armv5/urel/test_pp#.exe", "$(EPOCROOT)/epoc32/release/armv5/urel/test_pp#.exe.map", "$(EPOCROOT)/epoc32/release/armv5/udeb/test_pp#.exe.sym", "$(EPOCROOT)/epoc32/release/armv5/urel/test_pp#.exe.sym" ] targets = [] # Build up target list for 10 similar executables for num in range(1,mmpcount): for atarget in target_templ: targets.append(atarget.replace('pp#','pp'+ str(num))) mustmatch = [ ".*<recipe .*name='makefile_generation.*", ] mustnotmatch = [ ".*<recipe .*name='makefile_generation_export.*", ".*<error[^><]*>.*" ] warnings = 0 t.id = "104" t.name = "parallel_parsing" t.description = description t.command = command t.targets = targets t.mustmatch = mustmatch t.mustnotmatch = mustnotmatch t.warnings = warnings t.run() return t
def run(): t = SmokeTest() t.name = "exe_x86" t.description = "Build a basic EXE TARGETTYPE for x86" t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf -c x86" t.targets = [ "$(EPOCROOT)/epoc32/release/x86/udeb/test.exe", "$(EPOCROOT)/epoc32/release/x86/udeb/test.exe.map", "$(EPOCROOT)/epoc32/release/x86/urel/test.exe", "$(EPOCROOT)/epoc32/release/x86/urel/test.exe.map" ] t.addbuildtargets('smoke_suite/test_resources/simple/bld.inf', [ "test_/x86/udeb/test.o", "test_/x86/udeb/test.o.d", "test_/x86/udeb/test1.o", "test_/x86/udeb/test1.o.d", "test_/x86/udeb/test2.o", "test_/x86/udeb/test2.o.d", "test_/x86/udeb/test3.o", "test_/x86/udeb/test3.o.d", "test_/x86/udeb/test4.o", "test_/x86/udeb/test4.o.d", "test_/x86/udeb/test5.o", "test_/x86/udeb/test5.o.d", "test_/x86/udeb/test6.o", "test_/x86/udeb/test6.o.d", "test_/x86/urel/test.o", "test_/x86/urel/test.o.d", "test_/x86/urel/test1.o", "test_/x86/urel/test1.o.d", "test_/x86/urel/test2.o", "test_/x86/urel/test2.o.d", "test_/x86/urel/test3.o", "test_/x86/urel/test3.o.d", "test_/x86/urel/test4.o", "test_/x86/urel/test4.o.d", "test_/x86/urel/test5.o", "test_/x86/urel/test5.o.d", "test_/x86/urel/test6.o", "test_/x86/urel/test6.o.d", "test_/x86/udeb/test_udeb_objects.via", "test_/x86/urel/test_urel_objects.via" ]) t.run("windows") return t
def run(): t = SmokeTest() t.name = "exe_checksource" t.description = "Build a exe with a checksource filter" t.usebash = True bldinf = "smoke_suite/test_resources/checksource/helloworld/bld.inf" cmd1 = "sbs -b {0} REALLYCLEAN -m ${{SBSMAKEFILE}} -f ${{SBSLOGFILE}}".format(bldinf) cmd2 = "sbs -b {0} --filter=FilterCheckSource -m ${{SBSMAKEFILE}} -f ${{SBSLOGFILE}}".format(bldinf) cmd3 = "grep -i '.*checksource errors found.*' ${SBSLOGFILE}" t.command = cmd1 + " && " + cmd2 + " && " + cmd3 t.mustmatch_singleline = ["[1-9] checksource errors found"] t.returncode = 1 t.run("windows") return t
def run(): t = SmokeTest() t.id = "44" t.name = "mmp_select" t.description = "Test -p option" t.command = "sbs -b smoke_suite/test_resources/basics/helloworld/Bld.inf " \ + "-p hElLoWoRlD.mMp" t.targets = [ "$(EPOCROOT)/epoc32/release/armv5/udeb/HelloWorld.exe", "$(EPOCROOT)/epoc32/release/armv5/urel/HelloWorld.exe", "$(EPOCROOT)/epoc32/release/winscw/udeb/HelloWorld.exe", "$(EPOCROOT)/epoc32/release/winscw/urel/HelloWorld.exe" ] t.addbuildtargets('smoke_suite/test_resources/basics/helloworld/Bld.inf', [ "HelloWorld_exe/armv5/udeb/HelloWorld.o", "HelloWorld_exe/armv5/urel/HelloWorld.o", "HelloWorld_exe/winscw/udeb/HelloWorld.o", "HelloWorld_exe/winscw/urel/HelloWorld.o" ]) t.run() return t
def run(): t = SmokeTest() t.description = "This testcase tests specific cases of using APPLY" t.usebash = True # Introduce LINKER_OPTIONS for tools2 linker t.id = "0108" t.name = "apply_usecases" t.command = "sbs -b smoke_suite/test_resources/apply_usecases/linker_options/bld.inf -c tools2 -f -" t.targets = [ "$(EPOCROOT)/epoc32/release/tools2/rel/test_apply_linkeroptions.exe" ] t.addbuildtargets( "smoke_suite/test_resources/apply_usecases/linker_options/bld.inf", [ "test_apply_linkeroptions_/test_apply_linkeroptions_exe/tools2/deb/test_apply_linkeroptions.o", "test_apply_linkeroptions_/test_apply_linkeroptions_exe/tools2/rel/test_apply_linkeroptions.o" ]) t.mustmatch = ["-lwsock32"] t.run("windows") return t
def run(): t = SmokeTest() t.name = "badconfigs" t.description = """Tests that Raptor does indicate errors but does not traceback when reading faulty config files""" t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf --configpath=test/smoke_suite/test_resources/badconfigs --export-only -n -m ${SBSMAKEFILE} -f ${SBSLOGFILE}" t.mustmatch = [ "sbs: warning: Failed to read XML file: .*missing_model_close_tag.xml:14:3: mismatched tag.*", "sbs: warning: Failed to read XML file: .*missing_build_close.xml:18:0: no element found.*", "sbs: warning: Unknown element bset.*", "sbs: warning: Failed to read XML file: .*testconfig.xml:17:2: mismatched tag.*", "sbs: warning: Unknown element bset.*", "sbs: warning: Failed to read XML file: .*uknowntag.xml:17:2: mismatched tag.*", "sbs: warning: Failed to read XML file:.*notxml1.xml:1:5:.*" ] t.warnings = 7 t.errors = 0 t.returncode = 0 t.run() return t
def run(): t = SmokeTest() t.description = "test that long commands time out and get retried" exitCode = "128" t.id = "60a" t.name = "timeout" t.usebash = True t.command = "sbs -b smoke_suite/test_resources/timeout/bld.inf -f -" t.mustmatch_singleline = [ "status exit='failed' code='" + exitCode + "' attempt='1' reason='timeout'", ] t.errors = -1 t.returncode = 1 t.run() t.id = "60b" t.name = "timeout with retries" t.usebash = True t.command = "sbs -b smoke_suite/test_resources/timeout/bld.inf -t 3 -f -" t.mustmatch_singleline = [ "status exit='retry' code='" + exitCode + "' attempt='1' reason='timeout'", "status exit='retry' code='" + exitCode + "' attempt='2' reason='timeout'", "status exit='failed' code='" + exitCode + "' attempt='3' reason='timeout'", ] t.errors = -1 t.returncode = 1 t.run() t.id = "60" t.name = "timeout" t.print_result() return t
def run(): t = SmokeTest() t.id = "47" t.name = "sysdef_exports" t.description = "Test general system_definition.xml processing of exports" t.command = "sbs -a $(SBS_HOME)/test/smoke_suite/test_resources/sysdef -s smoke_suite/test_resources/sysdef/system_definition_mmp_export_dependencies_test.xml" t.targets = [ "$(SBS_HOME)/test/smoke_suite/test_resources/sysdef/dependent_on_exports/metadata_export_pre1.mmh", "$(SBS_HOME)/test/smoke_suite/test_resources/sysdef/dependent_on_exports/metadata_export_pre2.mmh", "$(EPOCROOT)/epoc32/release/armv5/udeb/dependent_on_exports.exe", "$(EPOCROOT)/epoc32/release/armv5/udeb/dependent_on_exports.exe.map", "$(EPOCROOT)/epoc32/release/armv5/udeb/dependent_on_exports.exe.sym", "$(EPOCROOT)/epoc32/release/armv5/urel/dependent_on_exports.exe", "$(EPOCROOT)/epoc32/release/armv5/urel/dependent_on_exports.exe.map", "$(EPOCROOT)/epoc32/release/armv5/urel/dependent_on_exports.exe.sym", "$(EPOCROOT)/epoc32/release/winscw/udeb/dependent_on_exports.exe", "$(EPOCROOT)/epoc32/release/winscw/urel/dependent_on_exports.exe", "$(EPOCROOT)/epoc32/release/winscw/urel/dependent_on_exports.exe.map" ] t.addbuildtargets( 'smoke_suite/test_resources/sysdef/dependent_on_exports/bld.inf', [ "dependent_on_exports_exe/armv5/udeb/dependent_on_exports_udeb_objects.via", "dependent_on_exports_exe/armv5/udeb/test.o", "dependent_on_exports_exe/armv5/udeb/test.o.d", "dependent_on_exports_exe/armv5/urel/dependent_on_exports_urel_objects.via", "dependent_on_exports_exe/armv5/urel/test.o", "dependent_on_exports_exe/armv5/urel/test.o.d", "dependent_on_exports_exe/winscw/udeb/dependent_on_exports.UID.CPP", "dependent_on_exports_exe/winscw/udeb/dependent_on_exports_UID_.dep", "dependent_on_exports_exe/winscw/udeb/dependent_on_exports_UID_.o", "dependent_on_exports_exe/winscw/udeb/test.dep", "dependent_on_exports_exe/winscw/udeb/test.o", "dependent_on_exports_exe/winscw/urel/dependent_on_exports.UID.CPP", "dependent_on_exports_exe/winscw/urel/dependent_on_exports_UID_.dep", "dependent_on_exports_exe/winscw/urel/dependent_on_exports_UID_.o", "dependent_on_exports_exe/winscw/urel/test.dep", "dependent_on_exports_exe/winscw/urel/test.o" ]) t.run() return t
def run(): t = SmokeTest() t.description = "Ensure Raptor builds Qt applications successfully" t.id = "0110" t.name = "qt_helloworld" # Its using rvct4_0 because thats's also the 10.1 default now. t.command = "sbs --qtpro smoke_suite/test_resources/qt/helloworld/helloworldqt.pro -k -c arm.v5.urel.rvct4_0 -c arm.v5.udeb.rvct4_0 -c winscw" t.targets = [ "$(SBS_HOME)/test/smoke_suite/test_resources/qt/helloworld/bld.inf", "$(SBS_HOME)/test/smoke_suite/test_resources/qt/helloworld/helloworldqt.loc", "$(SBS_HOME)/test/smoke_suite/test_resources/qt/helloworld/helloworldqt.rss", "$(SBS_HOME)/test/smoke_suite/test_resources/qt/helloworld/helloworldqt_reg.rss", "$(SBS_HOME)/test/smoke_suite/test_resources/qt/helloworld/helloworldqt_template.pkg", "$(SBS_HOME)/test/smoke_suite/test_resources/qt/helloworld/Makefile", "$(EPOCROOT)/epoc32/release/armv5/udeb/helloworldqt.exe.sym", "$(EPOCROOT)/epoc32/release/armv5/urel/helloworldqt.exe.sym", "$(EPOCROOT)/epoc32/release/armv5/udeb/helloworldqt.exe", "$(EPOCROOT)/epoc32/release/armv5/udeb/helloworldqt.exe.map", "$(EPOCROOT)/epoc32/release/armv5/urel/helloworldqt.exe", "$(EPOCROOT)/epoc32/release/armv5/urel/helloworldqt.exe.map", "$(EPOCROOT)/epoc32/release/winscw/urel/helloworldqt.exe", "$(EPOCROOT)/epoc32/release/winscw/udeb/helloworldqt.exe" ] t.addbuildtargets('smoke_suite/test_resources/qt/helloworld/bld.inf', [ "helloworldqt_exe/helloworldqt_helloworldqt.rsc", "helloworldqt_exe/armv5/udeb/helloworld.o", "helloworldqt_exe/armv5/udeb/helloworld.o.d", "helloworldqt_exe/armv5/urel/helloworld.o", "helloworldqt_exe/armv5/urel/helloworld.o.d", "helloworldqt_exe/winscw/udeb/helloworld.o", "helloworldqt_exe/winscw/udeb/helloworld.o.d", "helloworldqt_exe/winscw/urel/helloworld.o", "helloworldqt_exe/winscw/urel/helloworld.o.d" ]) t.run() return t
def run(): t = SmokeTest() t.usebash = True if "SBS_ELF2E32" in os.environ: elf2e32 = os.environ["SBS_ELF2E32"] elif sys.platform.startswith("win"): elf2e32 = "$(EPOCROOT)/epoc32/tools/elf2e32.exe" else: elf2e32 = "$(EPOCROOT)/epoc32/tools/elf2e32" description = """This test attempts to check that an exe gets the capabilities that we requested. It's ARM specific since it uses elf2e32. Tries to demonstrate capabilties being turned off then on in the mmp.""" command = "sbs -b smoke_suite/test_resources/simple/capability.inf -c {0} -m ${{SBSMAKEFILE}} -f ${{SBSLOGFILE}} && " + \ elf2e32 + " --dump=s --e32input=$(EPOCROOT)/epoc32/release/armv5/urel/test_capability.exe" targets = [ "$(EPOCROOT)/epoc32/release/armv5/urel/test_capability.exe", "$(EPOCROOT)/epoc32/release/armv5/urel/test_capability.exe.map" ] buildtargets = [] mustmatch = [ "\s*Secure ID: 10003a5c$", "\s*Vendor ID: 00000000$", "\s*Capabilities: 00000000 000fffbf$", "\s*CommDD$", "\s*PowerMgmt$", "\s*MultimediaDD$", "\s*ReadDeviceData$", "\s*WriteDeviceData$", "\s*TrustedUI$", "\s*DiskAdmin$", "\s*NetworkControl$", "\s*AllFiles$", "\s*SwEvent$", "\s*NetworkServices$", "\s*LocalServices$", "\s*ReadUserData$", "\s*WriteUserData$", "\s*Location$", "\s*SurroundingsDD$", "\s*UserEnvironment$", "\s*TCB$" ] mustnotmatch = ["DRM"] warnings = 0 t.name = "capability_arm" t.description = description t.command = command.format("arm.v5.urel.gcce4_4_1") t.targets = targets t.mustmatch = mustmatch t.mustnotmatch = mustnotmatch t.warnings = warnings t.run() return t
def run(): t = SmokeTest() t.id = "85a" t.name = "commandline_nodefaults" t.description = """Test that raptor complains if you run it without specifying any components and there is no default bld.inf or system definition in the current directory.""" t.usebash = True t.command = """ TMPDIR="build/commandline_testdefaults"; cd $(EPOCROOT)/epoc32 && rm -rf "$TMPDIR" 2>/dev/null; mkdir -p "$TMPDIR" && cd "$TMPDIR" && sbs ${SBSLOGFILE} -n ; rm -rf "$TMPDIR" """ t.mustmatch = [ ".*warning: No default bld.inf or system definition.*found.* " ] t.warnings = 1 t.run() t.id = "0085" t.name = "commandline" return t
def run(): t = SmokeTest() t.description = "Tests against log files to ensure it 'does the right thing'" t.id = "87a" t.name = "terminal_filter_tests_log" t.command = "$(SBS_HOME)/test/smoke_suite/test_resources/refilter/testfilterterminal" t.countmatch = [ # One of each type of error occurs early in the 'sbs' call where there # is a recipe inside another recipe. Then the errors occur in the # opposite order where are 2 closing tags next to each other before 2 # opening tags appear next to each other [ "sbs: error: Opening recipe tag found before closing recipe tag for previous recipe:", 2 ], ["Discarding previous recipe \(Possible logfile corruption\)", 2], ["sbs: error: Closing recipe tag found before opening recipe tag:", 2], ["Unable to print recipe data \(Possible logfile corruption\)", 2] ] t.errors = 4 t.run() t.id = "87b" t.name = "terminal_filter_tests_configs" t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf" t.countmatch = [] t.errors = 0 t.mustmatch_singleline = [ "built 'armv5_urel'", "built 'armv5_udeb'", "built 'winscw_urel'", "built 'winscw_udeb'" ] t.run() t.id = "87" t.name = "terminal_filter_tests" t.print_result() return t
def run(): t = SmokeTest() t.id = "113" t.name = "make_engine_errors" t.description = "Errors reported by gmake and emake should be escaped to ensure that the logs are valid XML" t.mustmatch_singleline = [ "Circular b <- a dependency", "non_existent_&_needs_escaping.txt" ] t.mustnotmatch_singleline = [ "Circular b <- a dependency", "non_existent_&_needs_escaping.txt" ] t.usebash = True t.errors = 1 t.returncode = 1 base_command = "sbs --no-depend-generate -b smoke_suite/test_resources/make_engine_errors/bld.inf -f-" t.id = "113a" t.name = "gmake_engine_errors" t.command = base_command + " -e make" t.run() t.id = "113b" t.name = "emake_engine_errors" t.command = base_command + " -e emake" t.run() t.id = "113c" t.name = "emake_engine_errors_with_merged_streams" t.command = base_command + " -e emake --mo=--emake-mergestreams=1" t.run() t.id = "113" t.name = "make_engine_errors" t.print_result() return t
def run(): t = SmokeTest() t.description = "tests that previous crash conditions now generate tidy errors." # no crash when there are bld.inf lines starting with a slash t.id = "45a" t.name = "raptor_crash" t.command = "sbs -b smoke_suite/test_resources/simple_crash/bld.inf" t.errors = 2 t.returncode = 1 t.run() # should get an error code when running inside cmd t.id = "45b" t.name = "error_cmd" t.usebash = True t.command = "cmd /c sbs -s no_such_thing" t.mustmatch = ["System Definition file no_such_thing does not exist"] t.errors = 1 t.returncode = 1 t.run("windows") # should get an error code when running in bash t.id = "45c" t.name = "error_bash" t.usebash = True t.command = "sbs -s no_such_thing" t.mustmatch = ["System Definition file no_such_thing does not exist"] t.errors = 1 t.returncode = 1 t.run() # print the over all result t.id = "45" t.name = "raptor_crash" t.print_result() return t
def run(): t = SmokeTest() t.description = "Test incremental rebuilding with TC on" t.id = "114a" t.name = "tracecompiler_incremental_clean" t.usebash = True t.command = "sbs -b smoke_suite/test_resources/tracecompiler/testTC/group/bld.inf -c armv5_urel.tracecompiler CLEAN" t.run() t.id = "114b" t.name = "tracecompiler_incremental_prebuild" t.command = "sbs -b smoke_suite/test_resources/tracecompiler/testTC/group/bld.inf -c armv5_urel.tracecompiler -f - -m ${SBSMAKEFILE}" t.countmatch = [["name='compile'", 3]] t.targets = [ "$(EPOCROOT)/epoc32/release/armv5/lib/testTC.dso", "$(EPOCROOT)/epoc32/release/armv5/lib/testTC{000a0000}.dso", "$(EPOCROOT)/epoc32/release/armv5/urel/testTC.dll", "$(EPOCROOT)/epoc32/release/armv5/urel/testTC.dll.map", "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/wlanhwinitTraces.h", "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/wlanhwinitmainTraces.h", "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/wlanhwinitpermparserTraces.h", "$(SBS_HOME)/test/smoke_suite/test_resources/tracecompiler/testTC/traces/fixed_id.definitions", "$(EPOCROOT)/epoc32/ost_dictionaries/testTC_0x1000008d_Dictionary.xml", "$(EPOCROOT)/epoc32/include/platform/symbiantraces/autogen/testTC_0x1000008d_TraceDefinitions.h" ] t.run() t.id = "114c" t.name = "tracecompiler_incremental_rebuild" t.command = "sleep 1; touch smoke_suite/test_resources/tracecompiler/testTC/src/wlanhwinit.cpp && sbs -b smoke_suite/test_resources/tracecompiler/testTC/group/bld.inf -c armv5_urel.tracecompiler -f - -m ${SBSMAKEFILE}" t.countmatch = [["name='compile'", 1]] t.targets = [] t.run() t.id = "114" t.name = "tracecompiler_incremental" return t
def run(): t = SmokeTest() t.name = "xml_invalid_chars" t.description = """Tests the validity of XML when output with characters not-allowed in XML are sent to the filters """ t.command = "sbs -b smoke_suite/test_resources/xml_invalid_chars/bld.inf " \ + "-c armv5" # The warning that causes the invalid characters to appear in the XML log t.warnings = 1 t.targets = [ "$(EPOCROOT)/epoc32/release/armv5/urel/test.exe", "$(EPOCROOT)/epoc32/release/armv5/udeb/test.exe" ] t.addbuildtargets('smoke_suite/test_resources/xml_invalid_chars/bld.inf', [ "test_/armv5/urel/test_urel_objects.via", "test_/armv5/urel/test.o.d", "test_/armv5/urel/test.o", "test_/armv5/udeb/test_udeb_objects.via", "test_/armv5/udeb/test.o.d", "test_/armv5/udeb/test.o" ]) t.run() if t.result == SmokeTest.PASS: log = t.logfile() print("Testing validity of XML file {0}".format(log)) logfile = open(ReplaceEnvs(log), "r") try: tree = parse(logfile) except: t.result = SmokeTest.FAIL t.print_result() return t
def run(): t = SmokeTest() t.logfileOption = lambda: "" t.id = "0074a" t.name = "configpath" t.description = """Test --configpath option for sbs. Specify two remote locations and use the variants in those folders along with ones in each of the default folders.""" # the variants here affect compile steps so we only need to see a single compile # to know whether the variant is doing its thing or not. t.addbuildtargets("smoke_suite/test_resources/simple/bld.inf", ["test_/armv5/udeb/test.o"]) result = SmokeTest.PASS # the extra config folders are # smoke_suite/test_resources/configpathtest/v{2,3} sbshome = os.environ["SBS_HOME"].replace("\\", "/") aFolder = sbshome + "/test/smoke_suite/test_resources/configpathtest/v2" bFolder = sbshome + "/test/smoke_suite/test_resources/configpathtest/v3" common = "sbs -b smoke_suite/test_resources/simple/bld.inf " + \ "-c armv5.configpathtest1.configpathtest2.configpathtest3" # run the command using the built-in default systemConfig t.command = common + " --configpath=" + aFolder + os.pathsep + bFolder + \ " -f -" t.mustmatch = [ ".*armv5_udeb.configpathtest1.configpathtest2.configpathtest3.*", ".*armv5_urel.configpathtest1.configpathtest2.configpathtest3.*", ".*Duplicate variant 'configpathtest3'.*", ".*-DTESTPASSED.*", ".*-DOSVARIANT95WASAPPLIED.*" ] t.mustnotmatch = [".*sbs: error: Unknown variant.*", ".*-DTESTFAILED.*"] # Duplicate variant is Info not Warn t.warnings = 0 t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL # run the command again using a systemConfig from $HOME/.sbs_init.xml # and the configpath as two separate options. t.usebash = True homedir = sbshome + "/test/smoke_suite/test_resources/configpathtest/home" t.command = "export HOME=" + homedir + "; " + common + \ " --configpath=" + aFolder + " --configpath=" + bFolder + " -f -" t.id = "0074b" t.mustmatch = [ ".*armv5_udeb.configpathtest1.configpathtest2.configpathtest3.*", ".*armv5_urel.configpathtest1.configpathtest2.configpathtest3.*", ".*Duplicate variant 'configpathtest3'.*" ] t.mustnotmatch = [".*sbs: error: Unknown variant.*"] t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL # Clean t.mustmatch = [] t.targets = [] t.id = "0074c" t.name = "CLEAN" t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf -c armv5 " + \ "REALLYCLEAN" t.run() # Does not contribute to results t.id = "74" t.name = "configpath" t.result = result t.print_result() return t
def run(): # Content for files to be generated. cpp = "longerfilenamethanyoumightnormallyexpecttobepresent" path = "/test/smoke_suite/test_resources/longfilenames/" targetinfo = """TARGET longfilenames.exe TARGETTYPE exe UID 0xE8000047 LIBRARY euser.lib SYSTEMINCLUDE /epoc32/include """ # Some numbers for path and file operations length_limit = 245 # Safety-margin of 10 chars for changing dir structures in Raptor extLen = 8 # eg. _001.o.d numLen = 43 # release directory length (c_0000000000000000/longfilenames_exe/winscw/urel/) (minus a few as a safety-margin) pathmultiplier = 5 # expand cpp to the maximum length mmpStart = 1 mmpStop = 270 cppStart = 1 cppStop = 270 # Find SBS_Home and its length as a string sbsHome = os.environ["SBS_HOME"] sbsLen = len(sbsHome) # Work out path lengths required dirname = sbsHome + path string = cpp * pathmultiplier dirlen = len(dirname) fileLen = length_limit - dirlen - numLen - extLen if fileLen < 0: print("Error: Your test path is too long for the longfilenames test to work") sys.exit() fileName = string[0:fileLen] # Generate the mmp file using the mmp string f = open(dirname + 'longfilenames.mmp', 'w') f.writelines(targetinfo) f.writelines("\nSOURCE " + cpp + ".cpp\n") while mmpStart <= mmpStop: sourceinfo = "SOURCE " + fileName + '_{0:03d}'.format(mmpStart) + ".cpp " + '\n' f.writelines(sourceinfo) mmpStart += 1 f.close() # File generating utility while cppStart <= cppStop: t = str(cppStart) filename = dirname + fileName + '_{0:03d}'.format(cppStart) + '.cpp' content = 'int x' + t + ' = 1;' f = open (filename, 'w') f.write (content) f.close() cppStart += 1 t = SmokeTest() t.name = "longfilenames" t.command = "sbs -b smoke_suite/test_resources/longfilenames/bld.inf -c winscw" t.description = """Ensure that winscw links with large amounts of object files with long names are buildable. Note that the link in the build of this component should always be greater than 16500 chars, regardless of environment - we know such calls are currently problematic on Windows with GNU Make and Cygwin's Bash unless a linker response file is not used to hold the object files.""" t.targets = [ "$(EPOCROOT)/epoc32/release/winscw/urel/longfilenames.exe", "$(EPOCROOT)/epoc32/release/winscw/urel/longfilenames.exe.map" ] t.addbuildtargets('smoke_suite/test_resources/longfilenames/bld.inf', [ "longfilenames_exe/winscw/urel/longerfilenamethanyoumightnormallyexpecttobepresent.dep", "longfilenames_exe/winscw/urel/longerfilenamethanyoumightnormallyexpecttobepresent.o", "longfilenames_exe/winscw/urel/longerfilenamethanyoumightnormallyexpecttobepresent.o.d", "longfilenames_exe/winscw/urel/longfilenames.UID.CPP", "longfilenames_exe/winscw/urel/longfilenames_UID_.dep", "longfilenames_exe/winscw/urel/longfilenames_UID_.o", "longfilenames_exe/winscw/urel/longfilenames_UID_.o.d", "longfilenames_exe/winscw/urel/longfilenames_urel_objects.lrf"] ) basefilename = "longfilenames_exe/winscw/urel/" + fileName + "_{0:03d}.{1}" for i in range(1, 271): t.addbuildtargets('smoke_suite/test_resources/longfilenames/bld.inf', [ basefilename.format(i, "dep"), basefilename.format(i, "o"), basefilename.format(i, "o.d") ] ) t.run() # Remove all created files # Matches longerfilena......_nnn.cpp cpp_regex = re.compile("^.+_\d{3}.cpp$", re.I) for file in os.listdir(dirname): if cpp_regex.match(file) is not None: try: os.remove(dirname + file) except: pass try: os.remove(dirname + 'longfilenames.mmp') except: pass return t
def run(): t = SmokeTest() t.name = "unfrozen" t.description = "Test EXPORTUNFROZEN forced import library generation with both completely unfrozen and part-frozen examples" t.command = "sbs -b smoke_suite/test_resources/unfrozen/bld.inf -k -c winscw -c armv5 CLEAN" \ " && sbs -b smoke_suite/test_resources/unfrozen/bld.inf -k -c winscw -c armv5" t.targets = [ "$(EPOCROOT)/epoc32/release/armv5/lib/unfrozensymbols.dso", "$(EPOCROOT)/epoc32/release/armv5/lib/unfrozensymbols{000a0000}.dso", "$(EPOCROOT)/epoc32/release/armv5/urel/unfrozensymbols.dll", "$(EPOCROOT)/epoc32/release/armv5/urel/unfrozensymbols.dll.sym", "$(EPOCROOT)/epoc32/release/armv5/urel/unfrozensymbols.dll.map", "$(EPOCROOT)/epoc32/release/armv5/lib/unfrozensymbols2.dso", "$(EPOCROOT)/epoc32/release/armv5/lib/unfrozensymbols2{000a0000}.dso", "$(EPOCROOT)/epoc32/release/armv5/urel/unfrozensymbols2.dll", "$(EPOCROOT)/epoc32/release/armv5/urel/unfrozensymbols2.dll.sym", "$(EPOCROOT)/epoc32/release/armv5/urel/unfrozensymbols2.dll.map", "$(EPOCROOT)/epoc32/release/armv5/urel/unfrozensymbols3.dll", "$(EPOCROOT)/epoc32/release/armv5/urel/unfrozensymbols3.dll.sym", "$(EPOCROOT)/epoc32/release/armv5/urel/unfrozensymbols3.dll.map", "$(EPOCROOT)/epoc32/release/armv5/urel/test_unfrozen.exe", "$(EPOCROOT)/epoc32/release/armv5/urel/test_unfrozen.exe.sym", "$(EPOCROOT)/epoc32/release/armv5/urel/test_unfrozen.exe.map", "$(EPOCROOT)/epoc32/release/winscw/urel/unfrozensymbols.dll", "$(EPOCROOT)/epoc32/release/winscw/urel/unfrozensymbols.dll.map", "$(EPOCROOT)/epoc32/release/winscw/urel/unfrozensymbols2.dll", "$(EPOCROOT)/epoc32/release/winscw/urel/unfrozensymbols2.dll.map", "$(EPOCROOT)/epoc32/release/winscw/urel/unfrozensymbols3.dll", "$(EPOCROOT)/epoc32/release/winscw/urel/unfrozensymbols3.dll.map", "$(EPOCROOT)/epoc32/release/winscw/urel/test_unfrozen.exe", "$(EPOCROOT)/epoc32/release/winscw/urel/test_unfrozen.exe.map", "$(EPOCROOT)/epoc32/release/armv5/udeb/unfrozensymbols.dll", "$(EPOCROOT)/epoc32/release/armv5/udeb/unfrozensymbols.dll.sym", "$(EPOCROOT)/epoc32/release/armv5/udeb/unfrozensymbols.dll.map", "$(EPOCROOT)/epoc32/release/armv5/udeb/unfrozensymbols2.dll", "$(EPOCROOT)/epoc32/release/armv5/udeb/unfrozensymbols2.dll.sym", "$(EPOCROOT)/epoc32/release/armv5/udeb/unfrozensymbols2.dll.map", "$(EPOCROOT)/epoc32/release/armv5/udeb/unfrozensymbols3.dll", "$(EPOCROOT)/epoc32/release/armv5/udeb/unfrozensymbols3.dll.sym", "$(EPOCROOT)/epoc32/release/armv5/udeb/unfrozensymbols3.dll.map", "$(EPOCROOT)/epoc32/release/armv5/udeb/test_unfrozen.exe", "$(EPOCROOT)/epoc32/release/armv5/udeb/test_unfrozen.exe.sym", "$(EPOCROOT)/epoc32/release/armv5/udeb/test_unfrozen.exe.map", "$(EPOCROOT)/epoc32/release/winscw/udeb/unfrozensymbols.dll", "$(EPOCROOT)/epoc32/release/winscw/udeb/unfrozensymbols.lib", "$(EPOCROOT)/epoc32/release/winscw/udeb/unfrozensymbols2.dll", "$(EPOCROOT)/epoc32/release/winscw/udeb/unfrozensymbols2.lib", "$(EPOCROOT)/epoc32/release/winscw/udeb/unfrozensymbols3.dll", "$(EPOCROOT)/epoc32/release/winscw/udeb/test_unfrozen.exe" ] t.addbuildtargets('smoke_suite/test_resources/unfrozen/bld.inf', [ "unfrozensymbols_dll/armv5/urel/unfrozensymbols{000a0000}.def", "unfrozensymbols_dll/armv5/urel/unfrozensymbols{000a0000}.dso", "unfrozensymbols_dll/armv5/urel/unfrozensymbols_urel_objects.via", "unfrozensymbols_dll/armv5/urel/unfrozensymbols.o.d", "unfrozensymbols_dll/armv5/urel/unfrozensymbols.o", "unfrozensymbols2_dll/armv5/urel/unfrozensymbols2{000a0000}.def", "unfrozensymbols2_dll/armv5/urel/unfrozensymbols2{000a0000}.dso", "unfrozensymbols2_dll/armv5/urel/unfrozensymbols2_urel_objects.via", "unfrozensymbols3_dll/armv5/urel/unfrozensymbols3{000a0000}.def", "unfrozensymbols3_dll/armv5/urel/unfrozensymbols3{000a0000}.dso", "unfrozensymbols3_dll/armv5/urel/unfrozensymbols3_urel_objects.via", "unfrozensymbols2_dll/armv5/urel/unfrozensymbols.o.d", "unfrozensymbols2_dll/armv5/urel/unfrozensymbols.o", "unfrozensymbols3_dll/armv5/urel/unfrozensymbols.o.d", "unfrozensymbols3_dll/armv5/urel/unfrozensymbols.o", "test_unfrozen_/armv5/urel/test_unfrozen_urel_objects.via", "test_unfrozen_/armv5/urel/test.o.d", "test_unfrozen_/armv5/urel/test.o", "unfrozensymbols_dll/winscw/urel/unfrozensymbols.UID.CPP", "unfrozensymbols_dll/winscw/urel/unfrozensymbols.o", "unfrozensymbols_dll/winscw/urel/unfrozensymbols_UID_.o", "unfrozensymbols_dll/winscw/urel/unfrozensymbols.dep", "unfrozensymbols_dll/winscw/urel/unfrozensymbols_UID_.dep", "unfrozensymbols_dll/winscw/urel/unfrozensymbols.o.d", "unfrozensymbols_dll/winscw/urel/unfrozensymbols_UID_.o.d", "unfrozensymbols_dll/winscw/urel/unfrozensymbols.lib", "unfrozensymbols_dll/winscw/urel/unfrozensymbols.inf", "unfrozensymbols_dll/winscw/urel/unfrozensymbols.dll", "unfrozensymbols_dll/winscw/urel/unfrozensymbols.def", "unfrozensymbols2_dll/winscw/urel/unfrozensymbols2.UID.CPP", "unfrozensymbols2_dll/winscw/urel/unfrozensymbols.o", "unfrozensymbols2_dll/winscw/urel/unfrozensymbols2_UID_.o", "unfrozensymbols2_dll/winscw/urel/unfrozensymbols.dep", "unfrozensymbols2_dll/winscw/urel/unfrozensymbols2_UID_.dep", "unfrozensymbols2_dll/winscw/urel/unfrozensymbols.o.d", "unfrozensymbols2_dll/winscw/urel/unfrozensymbols2_UID_.o.d", "unfrozensymbols2_dll/winscw/urel/unfrozensymbols2.lib", "unfrozensymbols2_dll/winscw/urel/unfrozensymbols2.inf", "unfrozensymbols2_dll/winscw/urel/unfrozensymbols2.dll", "unfrozensymbols2_dll/winscw/urel/unfrozensymbols2.def", "unfrozensymbols3_dll/winscw/urel/unfrozensymbols3.UID.CPP", "unfrozensymbols3_dll/winscw/urel/unfrozensymbols.o", "unfrozensymbols3_dll/winscw/urel/unfrozensymbols3_UID_.o", "unfrozensymbols3_dll/winscw/urel/unfrozensymbols.dep", "unfrozensymbols3_dll/winscw/urel/unfrozensymbols3_UID_.dep", "unfrozensymbols3_dll/winscw/urel/unfrozensymbols.o.d", "unfrozensymbols3_dll/winscw/urel/unfrozensymbols3_UID_.o.d", "unfrozensymbols3_dll/winscw/urel/unfrozensymbols3.lib", "unfrozensymbols3_dll/winscw/urel/unfrozensymbols3.inf", "unfrozensymbols3_dll/winscw/urel/unfrozensymbols3.dll", "unfrozensymbols3_dll/winscw/urel/unfrozensymbols3.def", "test_unfrozen_/winscw/urel/test_unfrozen.UID.CPP", "test_unfrozen_/winscw/urel/test.o", "test_unfrozen_/winscw/urel/test_unfrozen_UID_.o", "test_unfrozen_/winscw/urel/test.dep", "test_unfrozen_/winscw/urel/test_unfrozen_UID_.dep", "test_unfrozen_/winscw/urel/test.o.d", "test_unfrozen_/winscw/urel/test_unfrozen_UID_.o.d", "unfrozensymbols_dll/armv5/udeb/unfrozensymbols{000a0000}.def", "unfrozensymbols_dll/armv5/udeb/unfrozensymbols{000a0000}.dso", "unfrozensymbols_dll/armv5/udeb/unfrozensymbols_udeb_objects.via", "unfrozensymbols_dll/armv5/udeb/unfrozensymbols.o.d", "unfrozensymbols_dll/armv5/udeb/unfrozensymbols.o", "unfrozensymbols_dll/armv5/udeb/unfrozensymbols.o", "unfrozensymbols2_dll/armv5/udeb/unfrozensymbols2{000a0000}.def", "unfrozensymbols2_dll/armv5/udeb/unfrozensymbols2{000a0000}.dso", "unfrozensymbols2_dll/armv5/udeb/unfrozensymbols2_udeb_objects.via", "unfrozensymbols2_dll/armv5/udeb/unfrozensymbols.o.d", "unfrozensymbols2_dll/armv5/udeb/unfrozensymbols.o", "unfrozensymbols2_dll/armv5/udeb/unfrozensymbols.o", "unfrozensymbols3_dll/armv5/udeb/unfrozensymbols3{000a0000}.def", "unfrozensymbols3_dll/armv5/udeb/unfrozensymbols3{000a0000}.dso", "unfrozensymbols3_dll/armv5/udeb/unfrozensymbols3_udeb_objects.via", "unfrozensymbols3_dll/armv5/udeb/unfrozensymbols.o.d", "unfrozensymbols3_dll/armv5/udeb/unfrozensymbols.o", "unfrozensymbols3_dll/armv5/udeb/unfrozensymbols.o", "test_unfrozen_/armv5/udeb/test_unfrozen_udeb_objects.via", "test_unfrozen_/armv5/udeb/test.o.d", "test_unfrozen_/armv5/udeb/test.o", "unfrozensymbols_dll/winscw/udeb/unfrozensymbols.UID.CPP", "unfrozensymbols_dll/winscw/udeb/unfrozensymbols.o", "unfrozensymbols_dll/winscw/udeb/unfrozensymbols_UID_.o", "unfrozensymbols_dll/winscw/udeb/unfrozensymbols.dep", "unfrozensymbols_dll/winscw/udeb/unfrozensymbols_UID_.dep", "unfrozensymbols_dll/winscw/udeb/unfrozensymbols.o.d", "unfrozensymbols_dll/winscw/udeb/unfrozensymbols_UID_.o.d", "unfrozensymbols_dll/winscw/udeb/unfrozensymbols.lib", "unfrozensymbols_dll/winscw/udeb/unfrozensymbols.inf", "unfrozensymbols_dll/winscw/udeb/unfrozensymbols.dll", "unfrozensymbols_dll/winscw/udeb/unfrozensymbols.def", "unfrozensymbols2_dll/winscw/udeb/unfrozensymbols2.UID.CPP", "unfrozensymbols2_dll/winscw/udeb/unfrozensymbols.o", "unfrozensymbols2_dll/winscw/udeb/unfrozensymbols2_UID_.o", "unfrozensymbols2_dll/winscw/udeb/unfrozensymbols.dep", "unfrozensymbols2_dll/winscw/udeb/unfrozensymbols2_UID_.dep", "unfrozensymbols2_dll/winscw/udeb/unfrozensymbols.o.d", "unfrozensymbols2_dll/winscw/udeb/unfrozensymbols2_UID_.o.d", "unfrozensymbols2_dll/winscw/udeb/unfrozensymbols2.lib", "unfrozensymbols2_dll/winscw/udeb/unfrozensymbols2.inf", "unfrozensymbols2_dll/winscw/udeb/unfrozensymbols2.dll", "unfrozensymbols2_dll/winscw/udeb/unfrozensymbols2.def", "unfrozensymbols3_dll/winscw/udeb/unfrozensymbols3.UID.CPP", "unfrozensymbols3_dll/winscw/udeb/unfrozensymbols.o", "unfrozensymbols3_dll/winscw/udeb/unfrozensymbols3_UID_.o", "unfrozensymbols3_dll/winscw/udeb/unfrozensymbols.dep", "unfrozensymbols3_dll/winscw/udeb/unfrozensymbols3_UID_.dep", "unfrozensymbols3_dll/winscw/udeb/unfrozensymbols.o.d", "unfrozensymbols3_dll/winscw/udeb/unfrozensymbols3_UID_.o.d", "unfrozensymbols3_dll/winscw/udeb/unfrozensymbols3.lib", "unfrozensymbols3_dll/winscw/udeb/unfrozensymbols3.inf", "unfrozensymbols3_dll/winscw/udeb/unfrozensymbols3.dll", "unfrozensymbols3_dll/winscw/udeb/unfrozensymbols3.def", "test_unfrozen_/winscw/udeb/test_unfrozen.UID.CPP", "test_unfrozen_/winscw/udeb/test.o", "test_unfrozen_/winscw/udeb/test_unfrozen_UID_.o", "test_unfrozen_/winscw/udeb/test.dep", "test_unfrozen_/winscw/udeb/test_unfrozen_UID_.dep", "test_unfrozen_/winscw/udeb/test.o.d", "test_unfrozen_/winscw/udeb/test_unfrozen_UID_.o.d" ]) # Match both ARMV5 (elf2e32) and WINSCW (makedef) unfrozen export warnings and confirm the number found. Format: # Elf2e32: Warning: New Symbol _ZN10CMessenger5NewLCER12CConsoleBaseRK7TDesC16 found, export(s) not yet Frozen # F:/path/epocroot/epoc32/build/unfrozen/c_939fe933110ed5aa/unfrozensymbols_dll/winscw/udeb/unfrozensymbols.def(3) : ?NewLC@CMessenger@@SAPAV1@AAVCConsoleBase@@ABVTDesC16@@@Z @1 # More matches are expected with elf2e32 due to extra build impedimenta in EABI builds. t.countmatch = [[ ".*Elf2e32: Warning: New Symbol .* found, export\(s\) not yet Frozen.*", 26 ], [".*\.def\(\d\) : .*@\d.*", 18]] t.mustmatch_singleline = [ "Import library generation suppressed as frozen .def file not present: .*smoke_suite/test_resources/bwins/unfrozensymbols3u.def", "Import library generation suppressed as frozen .def file not present: .*smoke_suite/test_resources/eabi/unfrozensymbols3u.def" ] t.warnings = 8 # ABIv1 .lib files are not generated on Linux t.run() return t
def run(): t = SmokeTest() t.name = "resource" t.command = "sbs -b smoke_suite/test_resources/simple_gui/Bld.inf RESOURCE" t.targets = [ "$(EPOCROOT)/epoc32/data/z/resource/apps/helloworld.mbm", "$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/helloworld.mbm", "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/helloworld.mbm", "$(EPOCROOT)/epoc32/include/HelloWorld.rsg", "$(EPOCROOT)/epoc32/data/z/resource/apps/HelloWorld.rsc", "$(EPOCROOT)/epoc32/data/z/private/10003a3f/apps/HelloWorld_reg.rsc", "$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/HelloWorld.rsc", "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/HelloWorld.rsc", "$(EPOCROOT)/epoc32/release/winscw/udeb/z/private/10003a3f/apps/HelloWorld_reg.rsc", "$(EPOCROOT)/epoc32/release/winscw/urel/z/private/10003a3f/apps/HelloWorld_reg.rsc" ] t.addbuildtargets('smoke_suite/test_resources/simple_gui/Bld.inf', [ "helloworld_exe/helloworld.mbm_bmconvcommands", "HelloWorld_exe/HelloWorld_HelloWorld.rsc.rpp", "HelloWorld_exe/HelloWorld_HelloWorld.rsc.d", "HelloWorld_reg_exe/HelloWorld_reg_HelloWorld_reg.rsc.rpp", "HelloWorld_reg_exe/HelloWorld_reg_HelloWorld_reg.rsc.d" ]) t.mustnotmatch = ["HelloWorld.rss.* warning: trigraph"] t.run() t.name = "no_depend_gen_resource" t.usebash = True t.description = """Check that dependent resources still build correctly even when we turn dependency generation off. This test cannot really do this reliably, if you think about it, since it can't force make to try building resources in the 'wrong' order. What it does attempt is to check that the ultimately generated dependency file is ok. N.B. It also attempts to ensure that the dependency file is 'minimal' i.e. that it only references .mbg and .rsg files that might come from other parts of the same build. This is important for performance in situations where --no-depend-generate is used because the weight of 'complete' dependency information would overwhelm make. """ buildLocation = ReplaceEnvs( "$(EPOCROOT)/epoc32/build/") + BldInfFile.outputPathFragment( 'smoke_suite/test_resources/resource/group/bld.inf') res_depfile = buildLocation + "/dependentresource_/dependentresource_dependentresource.rsc.d" t.targets = [ "$(EPOCROOT)/epoc32/data/z/resource/anotherresource/testresource.r01", "$(EPOCROOT)/epoc32/data/z/resource/anotherresource/testresource.rsc", "$(EPOCROOT)/epoc32/data/z/resource/dependentresource/dependentresource.rsc", "$(EPOCROOT)/epoc32/data/z/resource/testresource/testresource.r01", "$(EPOCROOT)/epoc32/include/testresource.hrh", "$(EPOCROOT)/epoc32/include/testresource.rsg", "$(EPOCROOT)/epoc32/include/onelang.rsg", "$(EPOCROOT)/epoc32/release/armv5/urel/testresource.exe", "$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/anotherresource/testresource.r01", "$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/anotherresource/testresource.rsc", "$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/dependentresource/dependentresource.rsc", "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/anotherresource/testresource.r01", "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/anotherresource/testresource.rsc", "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/dependentresource/dependentresource.rsc", res_depfile ] t.addbuildtargets('smoke_suite/test_resources/resource/group/bld.inf', [ "dependentresource_/dependentresource_dependentresource.rsc", "testresource_/testresource_dependentresource.r01", "testresource_/testresource_dependentresource.rsc", "testheader_/testheader_testresource_sc.rsg.d", "testheader_/testheader_testresource_sc.rsg.rpp", "testresource_/testresource_testresource.r02.rpp", "onelang_/onelang_onelang_sc.rsg.rpp", "testresource_/testresource_testresource.rsc.rpp" ]) t.command = "sbs -b smoke_suite/test_resources/resource/group/bld.inf -c armv5_urel -c winscw_urel reallyclean ; sbs --no-depend-generate -j 16 -b smoke_suite/test_resources/resource/group/bld.inf -c armv5_urel -c winscw_urel -f ${{SBSLOGFILE}} -m ${{SBSMAKEFILE}} && grep 'epoc32.include.test[^ ]*.rsg' {0} && {{ X=`md5sum $(EPOCROOT)/epoc32/release/winscw/urel/z/resource/anotherresource/testresource.rsc` && Y=`md5sum $(EPOCROOT)/epoc32/data/z/resource/testresource/testresource.rsc` && [ \"${{X%% *}}\" != \"${{Y%% *}}\" ] ; }} && wc -l {1} ".format( res_depfile, res_depfile) t.mustnotmatch = [] t.mustmatch = [ "[23] .*.dependentresource_.dependentresource_dependentresource.rsc.d" ] t.run() t.name = "resource_corner_cases_reallyclean" t.usebash = True t.description = """ Additional corner cases for resources: 1) Use of "TARGETTYPE none" but not "TARGET" mmp keyword. 2) Use of a resource with no LANG. """ t.targets = [] t.command = "sbs -b smoke_suite/test_resources/resource/group/bld2.inf -c armv5_urel -c winscw_urel reallyclean" t.mustnotmatch = [] t.mustmatch = [] t.run() t.name = "resource_corner_cases" t.usebash = True t.description = """ Additional corner cases for resources: 1) Use of "TARGETTYPE none" but not "TARGET" mmp keyword. 2) Use of a resource with no LANG. """ buildLocation = ReplaceEnvs( "$(EPOCROOT)/epoc32/build/") + BldInfFile.outputPathFragment( 'smoke_suite/test_resources/resource/group/bld2.inf') rsc_file = buildLocation + "/testresource_/testresource_testresource.rsc" t.targets = [ "$(EPOCROOT)/epoc32/data/z/resource/apps/notargetkeyword.mbm", "$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/notargetkeyword.mbm", "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/notargetkeyword.mbm", rsc_file ] t.command = "sbs -b smoke_suite/test_resources/resource/group/bld2.inf -c armv5_urel -c winscw_urel" t.mustnotmatch = [] t.mustmatch = [] t.run() t.name = "resource_rsg_casefolding_fail" t.command = "sbs -b smoke_suite/test_resources/resource/rsg_casefolding/bld.inf RESOURCE" t.targets = [] t.warnings = 1 t.errors = 3 t.returncode = 1 t.run("linux") t.name = "resource_rsg_casefolding_pass" t.command = "sbs -b smoke_suite/test_resources/resource/rsg_casefolding/bld.inf --use-rsg-casefolding RESOURCE" t.targets = [] t.warnings = 0 t.errors = 0 t.returncode = 0 t.run("linux") t.name = 'resource' t.print_result() return t
def run(): t = SmokeTest() t.description = """talon_test: three part test 1) Test talon's -c option 2) Test talon with a script file that has some blank lines and a single non-blank command line 3) Test talon with a command that outputs control characters """ # Don't need these as we are not invoking Raptor t.logfileOption = lambda : "" t.makefileOption = lambda : "" # Set up variables for talon bindir = ReplaceEnvs("$(SBS_HOME)/$(HOSTPLATFORM_DIR)/bin") bash = "/bin/bash" talon = bindir + "/talon" # Adjust if on Windows - three "tries" for Bash on Windows. # 1 Default try if "win" in sys.platform.lower(): bash = ReplaceEnvs("$(SBS_HOME)/win32/cygwin/bin/bash.exe") talon = ReplaceEnvs("$(SBS_HOME)/$(HOSTPLATFORM_DIR)/bin/talon.exe") # 2 Bash from a Cygwin if "SBS_CYGWIN" in os.environ: bash = ReplaceEnvs("$(SBS_CYGWIN)/bin/bash.exe") # 3 Bash from an env. var. if "SBS_SHELL" in os.environ: bash = os.environ["SBS_SHELL"] # Talon's command line commandline="\"|name=commandlinetest;COMPONENT_META=commandline/group/bld.inf;PROJECT_META=commandline.mmp;|echo Command line invocation output\"" # Talon's "shell script" scriptfile=ReplaceEnvs("$(SBS_HOME)/test/smoke_suite/test_resources/talon_test/script") # Environment variables needed by talon - TALON_SHELL must be bash; the other two can be arbitrary. os.environ["TALON_SHELL"]=bash os.environ["TALON_BUILDID"]="{0}_{1}".format("talon_buildid", os.getpid()) os.environ["TALON_RECIPEATTRIBUTES"]="component=talontest" # First part of test - command line t.name = "talon_test_command_line" t.command = "{0} -c {1}".format(talon, commandline) t.targets = [] t.mustmatch_multiline = ["<recipe component=talontest>.*<!\[CDATA\[.*\+ echo Command line invocation output" + ".*\]\]><time start='\d+\.\d+' elapsed='\d+\.\d+' />" + ".*<status exit='ok' attempt='1' />.*</recipe>"] t.run() # Second part of test - script file t.name = "talon_test_script_file" t.command = "{0} {1}".format(talon, scriptfile) t.targets = [] t.mustmatch_multiline = ["<recipe component=talontest>.*<!\[CDATA\[.*\+ echo Script file output" + ".*\]\]><time start='\d+\.\d+' elapsed='\d+\.\d+' />" + ".*<status exit='ok' attempt='1' />.*</recipe>"] t.run() # a script which outputs control characters scriptfile=ReplaceEnvs("$(SBS_HOME)/test/smoke_suite/test_resources/talon_test/ctrl.py") t.name = "talon_test_control_chars" t.command = '{0} -c "|name=ctrl;|python {1}"'.format(talon, scriptfile) t.targets = [] # the script writes "AAA", then each char from 0 to 255, then "ZZZ". # 0-31 and 127-255 decimal are not allowed in the output, except for 9, 10 and 13. # check that the non-printable codes are missing and also that CTRL-I, CTRL-J and # CTRL-M are not converted. t.mustnotmatch = [ '[\000-\010\013\014\016-\037\177-\377]', '�[9ad];' ] # do not try and match CTRL-J and CTRL-M explicitly because line ending # conversions between talon and here will mess things up. t.mustmatch_multiline = ["<recipe component=talontest>.*<!\[CDATA\[.*" + "AAA�\011.*.* !\"#\$%&'()\*\+,-\./0123456789:;<=>\?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\[\\\]\^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿZZZ" + ".*\]\].*</recipe>"] t.run() # Print final result t.name = "talon_test" t.print_result() # Delete the added environment variables del os.environ["TALON_SHELL"] del os.environ["TALON_BUILDID"] del os.environ["TALON_RECIPEATTRIBUTES"] return t
def run(): t = SmokeTest() t.name = "dll_armv5_winscw_freeze" t.description = """Builds a component with unfrozen exports from clean, followed by a FREEZE, a further CLEAN and then a check that new .def files are present. The PERL environment variable is set to the absolute Perl path in order to test a known issue with the execution of tools such as efreeze under Cygwin when multiple arguments are listed. Part b tests whether removing an export works when using the variant; remove_freeze""" t.usebash = True perl_location = where("perl") t.command = """ sbs -b smoke_suite/test_resources/unfrozen/freeze.inf -p unfrozensymbols_for_freeze.mmp -c armv5 -c winscw CLEAN > /dev/null && export PERL="{0}" && sbs -b smoke_suite/test_resources/unfrozen/freeze.inf -p unfrozensymbols_for_freeze.mmp -c armv5 -c winscw > /dev/null && sbs -b smoke_suite/test_resources/unfrozen/freeze.inf -p unfrozensymbols_for_freeze.mmp -c armv5_urel -c winscw_urel FREEZE -m ${{SBSMAKEFILE}} -f ${{SBSLOGFILE}} """.format(perl_location) t.targets = [ "smoke_suite/test_resources/unfrozen/frozen/bwins/frozenu.def", "smoke_suite/test_resources/unfrozen/frozen/eabi/frozenu.def" ] t.warnings = 2 t.run() t.name = "armv5_re-freeze_with_removed_export" t.command = "sbs -b smoke_suite/test_resources/unfrozen/freeze.inf" \ " -p frozen_with_removed_export.mmp -c armv5_urel ;" \ " sbs -b smoke_suite/test_resources/unfrozen/freeze.inf" \ " -p frozen_with_removed_export.mmp FREEZE" \ " -c armv5_urel.remove_freeze" \ " -m ${SBSMAKEFILE} -f ${SBSLOGFILE} &&" \ " grep -ir '_ZN10CMessenger11ShowMessageEv @ 1 NONAME ABSENT' $(SBS_HOME)/test/smoke_suite/test_resources/unfrozen/frozen/eabi/frozenu.def" t.targets = [] t.mustmatch = [ "_ZN10CMessenger11ShowMessageEv @ 1 NONAME ABSENT" ] t.warnings = 0 t.errors = 1 t.run() t.name = "winscw_re-freeze_with_removed_export" t.command = "sbs -b smoke_suite/test_resources/unfrozen/freeze.inf" \ " -p frozen_with_removed_export.mmp -c winscw_urel ;" \ " sbs -b smoke_suite/test_resources/unfrozen/freeze.inf" \ " -p frozen_with_removed_export.mmp FREEZE" \ " -c winscw_urel.remove_freeze" \ " -m ${SBSMAKEFILE} -f ${SBSLOGFILE} &&" \ " grep -ir '?ShowMessage@CMessenger@@QAEXXZ @ 3 NONAME ABSENT' $(SBS_HOME)/test/smoke_suite/test_resources/unfrozen/frozen/bwins/frozenu.def" t.mustmatch = [ "\?ShowMessage@CMessenger@@QAEXXZ @ 3 NONAME ABSENT" ] t.run() t.name = "efreeze_info" t.command = "sbs -b smoke_suite/test_resources/unfrozen/freeze.inf" \ + " -p unfrozensymbols_for_freeze.mmp -c winscw freeze" t.mustmatch = [ "EFREEZE: DEF file up to date" ] t.warnings = 0 t.errors = 0 t.run() t.name = "dll_armv5_winscw_freeze" t.print_result() return t
def run(): t = SmokeTest() t.name = "whatlog_cache" t.description = """Test sbsv2cache.py cache file generation using Raptor .whatlog variant output. This is currently a Windows only activity due to CBR tools restrictions.""" t.usebash = True if 'SBS_PYTHON' in os.environ: pythonRun = "$(SBS_PYTHON)" else: pythonRun = "$(SBS_HOME)/win32/python27/python.exe" # Build something using the .whatlog variant. Take the build log and give it to sbsv2cache.py, deducing # the location of the generated cache file from the verbose output. If generated, dump the cache file to # STDOUT so we can validate the content in this test script. Clean up when finished. t.command = """sbs -b smoke_suite/test_resources/simple_gui/Bld.inf -f ${{SBSLOGFILE}} -m ${{SBSMAKEFILE}} -c armv5.whatlog -c winscw.whatlog CACHEFILE=`{0} $SBS_HOME/bin/sbsv2cache.py -v -s -o $EPOCROOT/epoc32/build/abldcache -l $SBSLOGFILE | sed -n \'s#Creating: ##p\'` if [ -n \"${{CACHEFILE:+x}}\" ]; then cat $CACHEFILE fi rm -r $EPOCROOT/epoc32/build/abldcache""".format(pythonRun) t.targets = [ "$(EPOCROOT)/epoc32/data/z/resource/apps/helloworld.mbm", "$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/helloworld.mbm", "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/helloworld.mbm", "$(EPOCROOT)/epoc32/include/HelloWorld.rsg", "$(EPOCROOT)/epoc32/data/z/resource/apps/HelloWorld.rsc", "$(EPOCROOT)/epoc32/data/z/private/10003a3f/apps/HelloWorld_reg.rsc", "$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/HelloWorld.rsc", "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/HelloWorld.rsc", "$(EPOCROOT)/epoc32/release/winscw/udeb/z/private/10003a3f/apps/HelloWorld_reg.rsc", "$(EPOCROOT)/epoc32/release/winscw/urel/z/private/10003a3f/apps/HelloWorld_reg.rsc", "$(EPOCROOT)/epoc32/release/armv5/udeb/helloworld.exe", "$(EPOCROOT)/epoc32/release/armv5/udeb/helloworld.exe.map", "$(EPOCROOT)/epoc32/release/winscw/udeb/helloworld.exe", "$(EPOCROOT)/epoc32/release/armv5/urel/helloworld.exe", "$(EPOCROOT)/epoc32/release/armv5/urel/helloworld.exe.map", "$(EPOCROOT)/epoc32/release/winscw/urel/helloworld.exe", "$(EPOCROOT)/epoc32/release/winscw/urel/helloworld.exe.map" ] t.addbuildtargets('smoke_suite/test_resources/simple_gui/Bld.inf', [ "helloworld_exe/helloworld.mbm_bmconvcommands", "HelloWorld_exe/HelloWorld_HelloWorld.rsc.rpp", "HelloWorld_exe/HelloWorld_HelloWorld.rsc.d", "helloworld_exe/armv5/udeb/HelloWorld_Application.o", "helloworld_exe/armv5/udeb/HelloWorld_Application.o.d", "helloworld_exe/armv5/udeb/HelloWorld_AppUi.o", "helloworld_exe/armv5/udeb/HelloWorld_AppUi.o.d", "helloworld_exe/armv5/udeb/HelloWorld_AppView.o", "helloworld_exe/armv5/udeb/HelloWorld_AppView.o.d", "helloworld_exe/armv5/udeb/HelloWorld_Document.o", "helloworld_exe/armv5/udeb/HelloWorld_Document.o.d", "helloworld_exe/armv5/udeb/HelloWorld_Main.o", "helloworld_exe/armv5/udeb/HelloWorld_Main.o.d", "helloworld_exe/armv5/udeb/helloworld_udeb_objects.via", "helloworld_exe/armv5/urel/HelloWorld_Application.o", "helloworld_exe/armv5/urel/HelloWorld_Application.o.d", "helloworld_exe/armv5/urel/HelloWorld_AppUi.o", "helloworld_exe/armv5/urel/HelloWorld_AppUi.o.d", "helloworld_exe/armv5/urel/HelloWorld_AppView.o", "helloworld_exe/armv5/urel/HelloWorld_AppView.o.d", "helloworld_exe/armv5/urel/HelloWorld_Document.o", "helloworld_exe/armv5/urel/HelloWorld_Document.o.d", "helloworld_exe/armv5/urel/HelloWorld_Main.o", "helloworld_exe/armv5/urel/HelloWorld_Main.o.d", "helloworld_exe/armv5/urel/helloworld_urel_objects.via", "helloworld_exe/winscw/udeb/helloworld.UID.CPP", "helloworld_exe/winscw/udeb/HelloWorld_Application.dep", "helloworld_exe/winscw/udeb/HelloWorld_Application.o", "helloworld_exe/winscw/udeb/HelloWorld_Application.o.d", "helloworld_exe/winscw/udeb/HelloWorld_AppUi.dep", "helloworld_exe/winscw/udeb/HelloWorld_AppUi.o", "helloworld_exe/winscw/udeb/HelloWorld_AppUi.o.d", "helloworld_exe/winscw/udeb/HelloWorld_AppView.dep", "helloworld_exe/winscw/udeb/HelloWorld_AppView.o", "helloworld_exe/winscw/udeb/HelloWorld_AppView.o.d", "helloworld_exe/winscw/udeb/HelloWorld_Document.dep", "helloworld_exe/winscw/udeb/HelloWorld_Document.o", "helloworld_exe/winscw/udeb/HelloWorld_Document.o.d", "helloworld_exe/winscw/udeb/HelloWorld_Main.dep", "helloworld_exe/winscw/udeb/HelloWorld_Main.o", "helloworld_exe/winscw/udeb/HelloWorld_Main.o.d", "helloworld_exe/winscw/udeb/helloworld_UID_.dep", "helloworld_exe/winscw/udeb/helloworld_UID_.o", "helloworld_exe/winscw/udeb/helloworld_UID_.o.d", "helloworld_exe/winscw/urel/helloworld.UID.CPP", "helloworld_exe/winscw/urel/HelloWorld_Application.dep", "helloworld_exe/winscw/urel/HelloWorld_Application.o", "helloworld_exe/winscw/urel/HelloWorld_Application.o.d", "helloworld_exe/winscw/urel/HelloWorld_AppUi.dep", "helloworld_exe/winscw/urel/HelloWorld_AppUi.o", "helloworld_exe/winscw/urel/HelloWorld_AppUi.o.d", "helloworld_exe/winscw/urel/HelloWorld_AppView.dep", "helloworld_exe/winscw/urel/HelloWorld_AppView.o", "helloworld_exe/winscw/urel/HelloWorld_AppView.o.d", "helloworld_exe/winscw/urel/HelloWorld_Document.dep", "helloworld_exe/winscw/urel/HelloWorld_Document.o", "helloworld_exe/winscw/urel/HelloWorld_Document.o.d", "helloworld_exe/winscw/urel/HelloWorld_Main.dep", "helloworld_exe/winscw/urel/HelloWorld_Main.o", "helloworld_exe/winscw/urel/HelloWorld_Main.o.d", "helloworld_exe/winscw/urel/helloworld_UID_.dep", "helloworld_exe/winscw/urel/helloworld_UID_.o", "helloworld_exe/winscw/urel/helloworld_UID_.o.d", "HelloWorld_reg_exe/HelloWorld_reg_HelloWorld_reg.rsc.d" ]) t.countmatch = [ ["\$self->{abldcache}->{.*\\\\test\\\\smoke_suite\\\\test_resources\\\\simple_gui target (armv5|winscw) (udeb|urel) -what\'} =", 4], [".*\'.*\\\\\\\\epoc32\\\\\\\\data\\\\\\\\z\\\\\\\\private\\\\\\\\10003a3f\\\\\\\\apps\\\\\\\\HelloWorld_reg.rsc\'", 4], [".*\'.*\\\\\\\\epoc32\\\\\\\\data\\\\\\\\z\\\\\\\\resource\\\\\\\\apps\\\\\\\\helloworld.mbm\'", 4], [".*\'.*\\\\\\\\epoc32\\\\\\\\data\\\\\\\\z\\\\\\\\resource\\\\\\\\apps\\\\\\\\HelloWorld.rsc\'", 4], [".*\'.*\\\\\\\\epoc32\\\\\\\\include\\\\\\\\HelloWorld.rsg\'", 4], [".*\'.*\\\\\\\\epoc32\\\\\\\\release\\\\\\\\(armv5|winscw)\\\\\\\\(udeb|urel)\\\\\\\\helloworld.exe\'",4], [".*\'.*\\\\\\\\epoc32\\\\\\\\release\\\\\\\\(armv5|winscw)\\\\\\\\(udeb|urel)\\\\\\\\helloworld.exe.map\'", 3], [".*\'.*\\\\\\\\epoc32\\\\\\\\release\\\\\\\\winscw\\\\\\\\(udeb|urel)\\\\\\\\z\\\\\\\\private\\\\\\\\10003a3f\\\\\\\\apps\\\\\\\\HelloWorld_reg.rsc\'", 2], [".*\'.*\\\\\\\\epoc32\\\\\\\\release\\\\\\\\winscw\\\\\\\\(udeb|urel)\\\\\\\\z\\\\\\\\resource\\\\\\\\apps\\\\\\\\helloworld.mbm\'", 2], [".*\'.*\\\\\\\\epoc32\\\\\\\\release\\\\\\\\winscw\\\\\\\\(udeb|urel)\\\\\\\\z\\\\\\\\resource\\\\\\\\apps\\\\\\\\HelloWorld.rsc\'", 2], ["\$self->{abldcache}->{\'plats\'} =", 1], [".*\'ARMV5\'", 1], [".*\'WINSCW\'", 1] ] t.run("windows") return t
def run(): t = SmokeTest() t.usebash = True result = SmokeTest.PASS mmpcount = 10 # how many mmps in this parallel parsing test target_templ = [ "$(EPOCROOT)/epoc32/release/armv5/udeb/test_pp#.exe", "$(EPOCROOT)/epoc32/release/armv5/udeb/test_pp#.exe.map", "$(EPOCROOT)/epoc32/release/armv5/urel/test_pp#.exe", "$(EPOCROOT)/epoc32/release/armv5/urel/test_pp#.exe.map", "$(EPOCROOT)/epoc32/release/armv5/udeb/test_pp#.exe.sym", "$(EPOCROOT)/epoc32/release/armv5/urel/test_pp#.exe.sym" ] targets = [] # Test appropriate startup script for platform: sbs_script="sbs" if t.onWindows: sbs_script="sbs.bat" # Build up target list for 10 similar executables for num in range(1,mmpcount): for atarget in target_templ: targets.append(atarget.replace('pp#','pp'+ str(num))) t.name = "parallel_parsing" t.description = """This test covers parallel parsing.""" t.command=("mkdir -p $(EPOCROOT)/epoc32/build && cd $(SBS_HOME)/test/smoke_suite/test_resources/pp/ && " "{0} --command=$(SBS_HOME)/test/smoke_suite/test_resources/pp/ppbldinf_commandfile -c armv5 -c winscw " "--pp=on --noexport -m {1} -f - | grep progress ".format(sbs_script, "${SBSMAKEFILE}")) t.targets = targets t.mustmatch = [ ".*<progress:start object_type='makefile' task='makefile_generation'.*" ] t.mustnotmatch = [ ".*<recipe .*name='makefile_generation_export.*", ".*<error[^><]*>.*" ] t.warnings = 0 t.run() t.name = "parallel_parsing_missing_includes_in_bld_inf" t.description = """ Ensure errors from parallel parsing are recorded by the top level Raptor. """ t.command=("{0} -s smoke_suite/test_resources/pp/sys_def.xml -c armv5 -k --pp=on reallyclean > /dev/null 2>&1; " "{0} -s smoke_suite/test_resources/pp/sys_def.xml -c armv5 -k --pp=on".format(sbs_script)) t.targets = [] t.mustmatch = [ "sbs: error: .*cpp.*test/smoke_suite/test_resources/pp/test01/bld.inf.*this_file_does_not_exist.inf: No such file or directory", ("sbs: error: Preprocessor exception.*Errors in .*test/smoke_suite/test_resources/pp/test01/bld.inf'' " ": in command.*cpp.*component.*test/smoke_suite/test_resources/pp/test01/bld.inf") ] t.mustnotmatch = [] t.warnings = -1 t.errors = -1 t.returncode = 1 t.run() t.name = "parallel_parsing" t.print_result() return t
def run(): result = SmokeTest.PASS t = SmokeTest() t.name = "exe_armv5_winscw_single_file_baseline_build" # Build component t.command = "sbs -b smoke_suite/test_resources/simple_gui/Bld.inf -c armv5 -c winscw" t.addbuildtargets('smoke_suite/test_resources/simple_gui/Bld.inf', [ "helloworld_exe/helloworld.mbm_bmconvcommands", "HelloWorld_exe/HelloWorld_HelloWorld.rsc", "HelloWorld_exe/HelloWorld_HelloWorld.rsc.rpp", "HelloWorld_exe/HelloWorld_HelloWorld.rsc.d", "helloworld_exe/armv5/udeb/HelloWorld_Application.o", "helloworld_exe/armv5/udeb/HelloWorld_Application.o.d", "helloworld_exe/armv5/udeb/HelloWorld_AppUi.o", "helloworld_exe/armv5/udeb/HelloWorld_AppUi.o.d", "helloworld_exe/armv5/udeb/HelloWorld_AppView.o", "helloworld_exe/armv5/udeb/HelloWorld_AppView.o.d", "helloworld_exe/armv5/udeb/HelloWorld_Document.o", "helloworld_exe/armv5/udeb/HelloWorld_Document.o.d", "helloworld_exe/armv5/udeb/HelloWorld_Main.o", "helloworld_exe/armv5/udeb/HelloWorld_Main.o.d", "helloworld_exe/armv5/udeb/helloworld_udeb_objects.via", "helloworld_exe/armv5/urel/HelloWorld_Application.o", "helloworld_exe/armv5/urel/HelloWorld_Application.o.d", "helloworld_exe/armv5/urel/HelloWorld_AppUi.o", "helloworld_exe/armv5/urel/HelloWorld_AppUi.o.d", "helloworld_exe/armv5/urel/HelloWorld_AppView.o", "helloworld_exe/armv5/urel/HelloWorld_AppView.o.d", "helloworld_exe/armv5/urel/HelloWorld_Document.o", "helloworld_exe/armv5/urel/HelloWorld_Document.o.d", "helloworld_exe/armv5/urel/HelloWorld_Main.o", "helloworld_exe/armv5/urel/HelloWorld_Main.o.d", "helloworld_exe/armv5/urel/helloworld_urel_objects.via", "helloworld_exe/winscw/udeb/helloworld.UID.CPP", "helloworld_exe/winscw/udeb/HelloWorld_Application.dep", "helloworld_exe/winscw/udeb/HelloWorld_Application.o", "helloworld_exe/winscw/udeb/HelloWorld_Application.o.d", "helloworld_exe/winscw/udeb/HelloWorld_AppUi.dep", "helloworld_exe/winscw/udeb/HelloWorld_AppUi.o", "helloworld_exe/winscw/udeb/HelloWorld_AppUi.o.d", "helloworld_exe/winscw/udeb/HelloWorld_AppView.dep", "helloworld_exe/winscw/udeb/HelloWorld_AppView.o", "helloworld_exe/winscw/udeb/HelloWorld_AppView.o.d", "helloworld_exe/winscw/udeb/HelloWorld_Document.dep", "helloworld_exe/winscw/udeb/HelloWorld_Document.o", "helloworld_exe/winscw/udeb/HelloWorld_Document.o.d", "helloworld_exe/winscw/udeb/HelloWorld_Main.dep", "helloworld_exe/winscw/udeb/HelloWorld_Main.o", "helloworld_exe/winscw/udeb/HelloWorld_Main.o.d", "helloworld_exe/winscw/udeb/helloworld_udeb_objects.lrf", "helloworld_exe/winscw/udeb/helloworld_UID_.dep", "helloworld_exe/winscw/udeb/helloworld_UID_.o", "helloworld_exe/winscw/udeb/helloworld_UID_.o.d", "helloworld_exe/winscw/urel/helloworld.UID.CPP", "helloworld_exe/winscw/urel/HelloWorld_Application.dep", "helloworld_exe/winscw/urel/HelloWorld_Application.o", "helloworld_exe/winscw/urel/HelloWorld_Application.o.d", "helloworld_exe/winscw/urel/HelloWorld_AppUi.dep", "helloworld_exe/winscw/urel/HelloWorld_AppUi.o", "helloworld_exe/winscw/urel/HelloWorld_AppUi.o.d", "helloworld_exe/winscw/urel/HelloWorld_AppView.dep", "helloworld_exe/winscw/urel/HelloWorld_AppView.o", "helloworld_exe/winscw/urel/HelloWorld_AppView.o.d", "helloworld_exe/winscw/urel/HelloWorld_Document.dep", "helloworld_exe/winscw/urel/HelloWorld_Document.o", "helloworld_exe/winscw/urel/HelloWorld_Document.o.d", "helloworld_exe/winscw/urel/HelloWorld_Main.dep", "helloworld_exe/winscw/urel/HelloWorld_Main.o", "helloworld_exe/winscw/urel/HelloWorld_Main.o.d", "helloworld_exe/winscw/urel/helloworld_UID_.dep", "helloworld_exe/winscw/urel/helloworld_UID_.o", "helloworld_exe/winscw/urel/helloworld_UID_.o.d", "helloworld_exe/winscw/urel/helloworld_urel_objects.lrf", "HelloWorld_reg_exe/HelloWorld_reg_HelloWorld_reg.rsc", "HelloWorld_reg_exe/HelloWorld_reg_HelloWorld_reg.rsc.rpp", "HelloWorld_reg_exe/HelloWorld_reg_HelloWorld_reg.rsc.d" ]) t.run() # Ensure we don't clean up from the previous build in any subsequent runs t.addbuildtargets('smoke_suite/test_resources/simple_gui/Bld.inf', []) t.targets = [] t.usebash = True # Touch both a straight source and a resource file and confirm we can recompile in isolation without additional impact t.name = "exe_armv5_winscw_single_file_touch_rebuild" t.command = """ sleep 1 touch smoke_suite/test_resources/simple_gui/HelloWorld_Document.cpp touch smoke_suite/test_resources/simple_gui/HelloWorld.rss sbs -f - --source-target=smoke_suite/test_resources/simple_gui/HelloWorld_Document.cpp --source-target=smoke_suite/test_resources/simple_gui/HelloWorld.rss -b smoke_suite/test_resources/simple_gui/Bld.inf""" t.countmatch = [[".*recipe name='resource(dependencies|compile)'", 2], [".*recipe name='compile'.*", 2], [".*recipe name='win32compile2object'.*", 2]] t.mustnotmatch = [".*recipe name='(win32simplelink|postlink|link)'.*"] t.run() # Attempt separate source and resource file compile where nothing should be done t.name = "exe_armv5_winscw_single_file_notouch_rebuild" t.command = "sbs -f - --source-target=smoke_suite/test_resources/simple_gui/HelloWorld_Document.cpp --source-target=smoke_suite/test_resources/simple_gui/HelloWorld.rss -b smoke_suite/test_resources/simple_gui/Bld.inf" t.mustmatch = [] t.countmatch = [[".*make.*Nothing to be done for.*SOURCETARGET_.*", 10]] t.mustnotmatch = [ ".*recipe name='(resourcecompile|win32compile2object|compile|win32simplelink|postlink|link)'.*" ] t.run() t.name = "exe_armv5_winscw_single_file" t.description = """Builds a component and tests single file compilation for straight source and resource files""" t.print_result() return t
def run(): t = SmokeTest() t.usebash = True result = SmokeTest.PASS description = """This test checks that the incremental parsing feature works and that it rebuilds makefiles if and only if the relevant metadata files or their pre-requisites have changed. ie. ig an mmp,bld.inf,mmh or included bld.inf have been altered. Incremental parsing is also sensitive to the configurations that are being built and to the environment (tools may change for example which may require that makefile be regenerated.) """ command = "sbs -b smoke_suite/test_resources/simple/bld.inf -f ${SBSLOGFILE} " targets = [ "$(EPOCROOT)/epoc32/release/armv5/urel/test.exe", "$(EPOCROOT)/epoc32/release/armv5/urel/test.exe.map", "$(EPOCROOT)/epoc32/release/armv5/urel/test.exe.sym", ] buildtargets = [ "test_/armv5/urel/test.o", "test_/armv5/urel/test.o.d", "test_/armv5/urel/test3.o.d", "test_/armv5/urel/test4.o.d", "test_/armv5/urel/test5.o.d", "test_/armv5/urel/test1.o.d", "test_/armv5/urel/test6.o.d", "test_/armv5/urel/test2.o.d", "test_/armv5/urel/test3.o", "test_/armv5/urel/test4.o", "test_/armv5/urel/test5.o", "test_/armv5/urel/test1.o", "test_/armv5/urel/test6.o", "test_/armv5/urel/test2.o", "test_/armv5/urel/test_urel_objects.via" ] mustmatch = [ ] # Make sure that the targets aren't there - quicker than doing a CLEAN for trg in targets: try: os.unlink(ReplaceEnvs(trg)) except OSError as e: pass # Ensure that all makefiles, build records etc from the past are # removed so that this test can run completely "cleanly" if "SBS_BUILD_DIR" in os.environ: old_sbs_build_dir = os.environ["SBS_BUILD_DIR"] os.environ["SBS_BUILD_DIR"] = os.path.join(old_sbs_build_dir, "incremental_parse") else: old_sbs_build_dir = None os.environ["SBS_BUILD_DIR"] = os.path.join(ReplaceEnvs("$(EPOCROOT)"), "epoc32", "build", "incremental_parse") t.sbs_build_dir = os.environ["SBS_BUILD_DIR"] shutil.rmtree(os.environ["SBS_BUILD_DIR"], ignore_errors=True) os.makedirs(os.environ["SBS_BUILD_DIR"]) t.name = "incremental_force" t.description = """ do a straightforward non-incremental build """ t.command = command + " -c arm.v5.urel.gcce4_4_1" t.targets = targets t.addbuildtargets("smoke_suite/test_resources/simple/bld.inf", buildtargets) t.mustmatch = [ "compile.*smoke_suite.test_resources.simple.test.cpp.*\[arm.v5.urel.gcce4_4_1\]", "compile.*smoke_suite.test_resources.simple.test.cia.*\[arm.v5.urel.gcce4_4_1\]", "compile.*smoke_suite.test_resources.simple.test1.c\+\+.*\[arm.v5.urel.gcce4_4_1\]", "compile.*smoke_suite.test_resources.simple.test2.cxx.*\[arm.v5.urel.gcce4_4_1\]", "compile.*smoke_suite.test_resources.simple.test3.Cpp.*\[arm.v5.urel.gcce4_4_1\]", "compile.*smoke_suite.test_resources.simple.test4.cc.*\[arm.v5.urel.gcce4_4_1\]", "compile.*smoke_suite.test_resources.simple.test5.CC.*\[arm.v5.urel.gcce4_4_1\]", "compile.*smoke_suite.test_resources.simple.test6.C\+\+.*\[arm.v5.urel.gcce4_4_1\]", "target.*epoc32.release.armv5.urel.test.exe.*\[arm.v5.urel.gcce4_4_1\]" ] t.run(noclean=True) t.name = "incremental_donothing" t.description = """ do a straightforward non-incremental build """ t.command = command + " -c arm.v5.urel.gcce4_4_1 --ip=on" t.targets = targets t.addbuildtargets("smoke_suite/test_resources/simple/bld.inf", buildtargets) t.mustmatch = [ "incremental makefile generation: pre-existing makefiles will be reused:.*", ] t.run(noclean=True) t.name = "incremental_touched_source_file" t.description = """ do a straightforward incremental build having changed a source file """ t.command = "touch $SBS_HOME/test/smoke_suite/test_resources/simple/test.cpp; " + command + " -c arm.v5.urel.gcce4_4_1 --ip=on" t.targets = targets t.addbuildtargets("smoke_suite/test_resources/simple/bld.inf", buildtargets) t.mustmatch = [ "incremental makefile generation: pre-existing makefiles will be reused:.*", "compile.*smoke_suite.test_resources.simple.test.cpp.*\[arm.v5.urel.gcce4_4_1\]", "target.*epoc32.release.armv5.urel.test.exe.*\[arm.v5.urel.gcce4_4_1\]", ] t.mustnotmatch = [ "compile.*smoke_suite.test_resources.simple.test.cia.*\[arm.v5.urel.gcce4_4_1\]", "compile.*smoke_suite.test_resources.simple.test1.c\+\+.*\[arm.v5.urel.gcce4_4_1\]", "compile.*smoke_suite.test_resources.simple.test2.cxx.*\[arm.v5.urel.gcce4_4_1\]", "compile.*smoke_suite.test_resources.simple.test3.Cpp.*\[arm.v5.urel.gcce4_4_1\]", "compile.*smoke_suite.test_resources.simple.test4.cc.*\[arm.v5.urel.gcce4_4_1\]", "compile.*smoke_suite.test_resources.simple.test5.CC.*\[arm.v5.urel.gcce4_4_1\]", "compile.*smoke_suite.test_resources.simple.test6.C\+\+.*\[arm.v5.urel.gcce4_4_1\]" ] t.run(noclean=True) t.name = "incremental_touched_mmp_file" t.description = """ do a straightforward incremental build having changed an mmp file """ t.command = "sleep 1; touch $SBS_HOME/test/smoke_suite/test_resources/simple/simple.mmp; sleep 1; " + command + " -c arm.v5.urel.gcce4_4_1 --ip=on" t.targets = targets t.addbuildtargets("smoke_suite/test_resources/simple/bld.inf", buildtargets) t.mustmatch = [ "incremental makefile generation: cannot reuse any pre-existing makefiles", "incremental makefile generation: metadata changed: .*simple.simple\.mmp", "compile.*smoke_suite.test_resources.simple.test.cpp.*\[arm.v5.urel.gcce4_4_1\]", "compile.*smoke_suite.test_resources.simple.test1.c\+\+.*\[arm.v5.urel.gcce4_4_1\]", "compile.*smoke_suite.test_resources.simple.test.cia.*\[arm.v5.urel.gcce4_4_1\]", "compile.*smoke_suite.test_resources.simple.test2.cxx.*\[arm.v5.urel.gcce4_4_1\]", "compile.*smoke_suite.test_resources.simple.test3.Cpp.*\[arm.v5.urel.gcce4_4_1\]", "compile.*smoke_suite.test_resources.simple.test4.cc.*\[arm.v5.urel.gcce4_4_1\]", "compile.*smoke_suite.test_resources.simple.test5.CC.*\[arm.v5.urel.gcce4_4_1\]", "compile.*smoke_suite.test_resources.simple.test6.C\+\+.*\[arm.v5.urel.gcce4_4_1\]", "target.*epoc32.release.armv5.urel.test.exe.*\[arm.v5.urel.gcce4_4_1\]" ] t.mustnotmatch = [] t.run(noclean=True) t.name = "incremental_changed_configuration" t.description = """ do a straightforward incremental build having changed the configuration """ t.command = command + " -c arm.v5.udeb.gcce4_4_1 --ip=on" # need udeb versions for this part of the test t.targets = [x.replace("urel", "udeb") for x in targets] t.addbuildtargets("smoke_suite/test_resources/simple/bld.inf", [x.replace("urel", "udeb") for x in buildtargets]) t.mustmatch = [ "incremental makefile generation: cannot reuse any pre-existing makefiles", "incremental makefile generation: no metadata was newer than the makefiles", "compile.*smoke_suite.test_resources.simple.test.cpp.*\[arm.v5.udeb.gcce4_4_1\]", "compile.*smoke_suite.test_resources.simple.test1.c\+\+.*\[arm.v5.udeb.gcce4_4_1\]", "compile.*smoke_suite.test_resources.simple.test.cia.*\[arm.v5.udeb.gcce4_4_1\]", "compile.*smoke_suite.test_resources.simple.test2.cxx.*\[arm.v5.udeb.gcce4_4_1\]", "compile.*smoke_suite.test_resources.simple.test3.Cpp.*\[arm.v5.udeb.gcce4_4_1\]", "compile.*smoke_suite.test_resources.simple.test4.cc.*\[arm.v5.udeb.gcce4_4_1\]", "compile.*smoke_suite.test_resources.simple.test5.CC.*\[arm.v5.udeb.gcce4_4_1\]", "compile.*smoke_suite.test_resources.simple.test6.C\+\+.*\[arm.v5.udeb.gcce4_4_1\]", "target.*epoc32.release.armv5.udeb.test.exe.*\[arm.v5.udeb.gcce4_4_1\]" ] t.mustnotmatch = [] t.run() # Restore SBS_BUILD_DIR if needed if old_sbs_build_dir != None: os.environ["SBS_BUILD_DIR"] = old_sbs_build_dir else: del os.environ["SBS_BUILD_DIR"] t.name = "incremental_parsing" return t
def run(): t = SmokeTest() t.name = "openenvironment" t.description = """Test STDEXE, STDLIB and STDDLL creation; Test open environment project linking against a symbian environment library; Test symbian environment project linking against an open environment library""" t.usebash = True t.command = "sbs -k -b smoke_suite/test_resources/oe/group/bld.inf -c armv5 -c winscw " + \ "-m ${SBSMAKEFILE} -f ${SBSLOGFILE}; grep -E \"(armlink|checklib|mwldsym2)\" ${SBSLOGFILE}" t.errors = 1 # The test has errors so make will return a fail code and raptor will report this t.targets = [ "$(EPOCROOT)/epoc32/release/armv5/urel/t_oedll.dll.sym", "$(EPOCROOT)/epoc32/release/armv5/urel/symbian_test.lib", "$(EPOCROOT)/epoc32/release/armv5/urel/t_oeexe.exe.map", "$(EPOCROOT)/epoc32/release/armv5/urel/t_oelib.lib", "$(EPOCROOT)/epoc32/release/armv5/urel/t_oeexe.exe", "$(EPOCROOT)/epoc32/release/armv5/urel/t_oeexe.exe.sym", "$(EPOCROOT)/epoc32/release/armv5/urel/t_oedll.dll.map", "$(EPOCROOT)/epoc32/release/armv5/udeb/t_oedll.dll.sym", "$(EPOCROOT)/epoc32/release/armv5/udeb/symbian_test.lib", "$(EPOCROOT)/epoc32/release/armv5/udeb/t_oeexe.exe.map", "$(EPOCROOT)/epoc32/release/armv5/udeb/t_oelib.lib", "$(EPOCROOT)/epoc32/release/armv5/udeb/t_oeexe.exe", "$(EPOCROOT)/epoc32/release/armv5/udeb/t_oeexe.exe.sym", "$(EPOCROOT)/epoc32/release/armv5/udeb/t_oedll.dll.map", "$(EPOCROOT)/epoc32/release/armv5/lib/t_oedll.dso", "$(EPOCROOT)/epoc32/release/armv5/lib/t_oedll{000a0000}.dso", "$(EPOCROOT)/epoc32/release/winscw/urel/symbian_test.lib", "$(EPOCROOT)/epoc32/release/winscw/urel/t_oedll.dll", "$(EPOCROOT)/epoc32/release/winscw/urel/t_oeexe.exe.map", "$(EPOCROOT)/epoc32/release/winscw/urel/t_oelib.lib", "$(EPOCROOT)/epoc32/release/winscw/urel/t_oeexe.exe", "$(EPOCROOT)/epoc32/release/winscw/urel/t_oedll.dll.map", "$(EPOCROOT)/epoc32/release/winscw/udeb/symbian_test.lib", "$(EPOCROOT)/epoc32/release/winscw/udeb/t_oedll.lib", "$(EPOCROOT)/epoc32/release/winscw/udeb/t_oedll.dll", "$(EPOCROOT)/epoc32/release/winscw/udeb/t_oelib.lib" ] t.addbuildtargets( 'smoke_suite/test_resources/oe/group/bld.inf', [ "t_oedll_dll/armv5/urel/t_oedll{000a0000}.dso", "t_oedll_dll/armv5/urel/t_oedll_urel_objects.via", "t_oedll_dll/armv5/urel/t_oedll.o", "t_oedll_dll/armv5/urel/t_oedll.o.d", # either prep file can exist - luck determines which [ 't_oedll_dll/armv5/urel/t_oedll.prep', 't_oedll_dll/armv5/udeb/t_oedll.prep' ], "t_oedll_dll/armv5/urel/t_oedll{000a0000}.def", "t_oedll_dll/armv5/udeb/t_oedll{000a0000}.dso", "t_oedll_dll/armv5/udeb/t_oedll_udeb_objects.via", "t_oedll_dll/armv5/udeb/t_oedll.o", "t_oedll_dll/armv5/udeb/t_oedll.o.d", "t_oedll_dll/armv5/udeb/t_oedll{000a0000}.def", "symbian_test_lib/armv5/urel/symbian_test_urel_objects.via", "symbian_test_lib/armv5/urel/symbian_lib.o.d", "symbian_test_lib/armv5/urel/symbian_lib.o", "symbian_test_lib/armv5/udeb/symbian_test_udeb_objects.via", "symbian_test_lib/armv5/udeb/symbian_lib.o.d", "symbian_test_lib/armv5/udeb/symbian_lib.o", "wrong_newlib_test_oeexe_exe/armv5/urel/wrong_newlib_test_oeexe_urel_objects.via", "wrong_newlib_test_oeexe_exe/armv5/urel/t_oeexe.o", "wrong_newlib_test_oeexe_exe/armv5/urel/t_oeexe.o.d", "wrong_newlib_test_oeexe_exe/armv5/udeb/t_oeexe.o", "wrong_newlib_test_oeexe_exe/armv5/udeb/wrong_newlib_test_oeexe_udeb_objects.via", "wrong_newlib_test_oeexe_exe/armv5/udeb/t_oeexe.o.d", "wrong_newlib_seexe_exe/armv5/urel/wrong_newlib_seexe_urel_objects.via", "wrong_newlib_seexe_exe/armv5/urel/wrong_newlib_symbian.o", "wrong_newlib_seexe_exe/armv5/urel/wrong_newlib_symbian.o.d", "wrong_newlib_seexe_exe/armv5/udeb/wrong_newlib_seexe_udeb_objects.via", "wrong_newlib_seexe_exe/armv5/udeb/wrong_newlib_symbian.o", "wrong_newlib_seexe_exe/armv5/udeb/wrong_newlib_symbian.o.d", "t_oeexe_exe/armv5/urel/t_oeexe_urel_objects.via", "t_oeexe_exe/armv5/urel/t_oeexe.o", "t_oeexe_exe/armv5/urel/t_oeexe.o.d", "t_oeexe_exe/armv5/udeb/t_oeexe.o", "t_oeexe_exe/armv5/udeb/t_oeexe.o.d", "t_oeexe_exe/armv5/udeb/t_oeexe_udeb_objects.via", "t_oelib_lib/armv5/urel/t_oelib_urel_objects.via", "t_oelib_lib/armv5/urel/t_oelib.o", "t_oelib_lib/armv5/urel/t_oelib.o.d", "t_oelib_lib/armv5/udeb/t_oelib.o", "t_oelib_lib/armv5/udeb/t_oelib_udeb_objects.via", "t_oelib_lib/armv5/udeb/t_oelib.o.d", "t_oedll_dll/winscw/urel/t_oedll.dep", "t_oedll_dll/winscw/urel/t_oedll.lib", "t_oedll_dll/winscw/urel/t_oedll_SYM_.cpp", "t_oedll_dll/winscw/urel/t_oedll.dll", "t_oedll_dll/winscw/urel/t_oedll_UID_.o", "t_oedll_dll/winscw/urel/t_oedll_SYM_.o", "t_oedll_dll/winscw/urel/t_oedll.o", "t_oedll_dll/winscw/urel/t_oedll_UID_.o.d", "t_oedll_dll/winscw/urel/t_oedll.o.d", "t_oedll_dll/winscw/urel/t_oedll_UID_.dep", "t_oedll_dll/winscw/urel/t_oedll.sym", "t_oedll_dll/winscw/urel/t_oedll.UID.CPP", "t_oedll_dll/winscw/urel/t_oedll_SYM_.o.d", "t_oedll_dll/winscw/urel/t_oedll_SYM_.dep", # The prep.def file can be in urel or udeb [ 't_oedll_dll/winscw/urel/t_oedll.prep.def', 't_oedll_dll/winscw/udeb/t_oedll.prep.def' ], "t_oedll_dll/winscw/urel/t_oedll.def", "t_oedll_dll/winscw/urel/t_oedll.inf", "t_oedll_dll/winscw/udeb/t_oedll.dep", "t_oedll_dll/winscw/udeb/t_oedll.lib", "t_oedll_dll/winscw/udeb/t_oedll_SYM_.cpp", "t_oedll_dll/winscw/udeb/t_oedll.dll", "t_oedll_dll/winscw/udeb/t_oedll_UID_.o", "t_oedll_dll/winscw/udeb/t_oedll_SYM_.o", "t_oedll_dll/winscw/udeb/t_oedll.o", "t_oedll_dll/winscw/udeb/t_oedll_UID_.o.d", "t_oedll_dll/winscw/udeb/t_oedll.o.d", "t_oedll_dll/winscw/udeb/t_oedll_UID_.dep", "t_oedll_dll/winscw/udeb/t_oedll.sym", "t_oedll_dll/winscw/udeb/t_oedll.UID.CPP", "t_oedll_dll/winscw/udeb/t_oedll_SYM_.o.d", "t_oedll_dll/winscw/udeb/t_oedll_SYM_.dep", "t_oedll_dll/winscw/udeb/t_oedll.def", "t_oedll_dll/winscw/udeb/t_oedll.inf", "symbian_test_lib/winscw/urel/symbian_lib.dep", "symbian_test_lib/winscw/urel/symbian_lib.o.d", "symbian_test_lib/winscw/urel/symbian_lib.o", "symbian_test_lib/winscw/udeb/symbian_lib.dep", "symbian_test_lib/winscw/udeb/symbian_lib.o.d", "symbian_test_lib/winscw/udeb/symbian_lib.o", "wrong_newlib_test_oeexe_exe/winscw/urel/wrong_newlib_test_oeexe_UID_.dep", "wrong_newlib_test_oeexe_exe/winscw/urel/wrong_newlib_test_oeexe_UID_.o.d", "wrong_newlib_test_oeexe_exe/winscw/urel/t_oeexe_wins.dep", "wrong_newlib_test_oeexe_exe/winscw/urel/t_oeexe_wins.o", "wrong_newlib_test_oeexe_exe/winscw/urel/wrong_newlib_test_oeexe.UID.CPP", "wrong_newlib_test_oeexe_exe/winscw/urel/wrong_newlib_test_oeexe_UID_.o", "wrong_newlib_test_oeexe_exe/winscw/urel/t_oeexe_wins.o.d", "wrong_newlib_test_oeexe_exe/winscw/udeb/wrong_newlib_test_oeexe_UID_.dep", "wrong_newlib_test_oeexe_exe/winscw/udeb/wrong_newlib_test_oeexe_UID_.o.d", "wrong_newlib_test_oeexe_exe/winscw/udeb/t_oeexe_wins.dep", "wrong_newlib_test_oeexe_exe/winscw/udeb/t_oeexe_wins.o", "wrong_newlib_test_oeexe_exe/winscw/udeb/wrong_newlib_test_oeexe.UID.CPP", "wrong_newlib_test_oeexe_exe/winscw/udeb/wrong_newlib_test_oeexe_UID_.o", "wrong_newlib_test_oeexe_exe/winscw/udeb/t_oeexe_wins.o.d", "wrong_newlib_seexe_exe/winscw/urel/wrong_newlib_seexe_UID_.dep", "wrong_newlib_seexe_exe/winscw/urel/wrong_newlib_seexe_UID_.o", "wrong_newlib_seexe_exe/winscw/urel/wrong_newlib_symbian.dep", "wrong_newlib_seexe_exe/winscw/urel/wrong_newlib_symbian.o", "wrong_newlib_seexe_exe/winscw/urel/wrong_newlib_symbian.o.d", "wrong_newlib_seexe_exe/winscw/urel/wrong_newlib_seexe.UID.CPP", "wrong_newlib_seexe_exe/winscw/urel/wrong_newlib_seexe_UID_.o.d", "wrong_newlib_seexe_exe/winscw/udeb/wrong_newlib_seexe_UID_.dep", "wrong_newlib_seexe_exe/winscw/udeb/wrong_newlib_seexe_UID_.o", "wrong_newlib_seexe_exe/winscw/udeb/wrong_newlib_symbian.dep", "wrong_newlib_seexe_exe/winscw/udeb/wrong_newlib_symbian.o", "wrong_newlib_seexe_exe/winscw/udeb/wrong_newlib_symbian.o.d", "wrong_newlib_seexe_exe/winscw/udeb/wrong_newlib_seexe.UID.CPP", "wrong_newlib_seexe_exe/winscw/udeb/wrong_newlib_seexe_UID_.o.d", "t_oeexe_exe/winscw/urel/t_oeexe_UID_.o", "t_oeexe_exe/winscw/urel/t_oeexe_UID_.dep", "t_oeexe_exe/winscw/urel/t_oeexe_wins.dep", "t_oeexe_exe/winscw/urel/t_oeexe_wins.o", "t_oeexe_exe/winscw/urel/t_oeexe_UID_.o.d", "t_oeexe_exe/winscw/urel/t_oeexe.UID.CPP", "t_oeexe_exe/winscw/urel/t_oeexe_wins.o.d", "t_oeexe_exe/winscw/udeb/t_oeexe_UID_.o", "t_oeexe_exe/winscw/udeb/t_oeexe_UID_.dep", "t_oeexe_exe/winscw/udeb/t_oeexe_wins.dep", "t_oeexe_exe/winscw/udeb/t_oeexe_wins.o", "t_oeexe_exe/winscw/udeb/t_oeexe_UID_.o.d", "t_oeexe_exe/winscw/udeb/t_oeexe.UID.CPP", "t_oeexe_exe/winscw/udeb/t_oeexe_wins.o.d", "t_oelib_lib/winscw/urel/t_oelib.o", "t_oelib_lib/winscw/urel/t_oelib.o.d", "t_oelib_lib/winscw/urel/t_oelib.dep", "t_oelib_lib/winscw/udeb/t_oelib.o", "t_oelib_lib/winscw/udeb/t_oelib.o.d", "t_oelib_lib/winscw/udeb/t_oelib.dep" ]) # On 9.4 the open environment checks for # mixed symbianc++ and stdc++ new/delete won't fail if getsymbianversion() != "9.4": t.mustmatch = [ '.*checklib: error: library .*epoc32.release.armv5.urel.symbian_test.lib is incompatible with standard.*', '.*checklib: error: library .*epoc32.release.armv5.urel.t_oelib.lib is incompatible with Symbian.*', '.*checklib: error: library .*epoc32.release.armv5.udeb.symbian_test.lib is incompatible with standard.*', '.*checklib: error: library .*epoc32.release.armv5.udeb.t_oelib.lib is incompatible with Symbian.*', '.*checklib: error: library .*epoc32.release.winscw.urel.symbian_test.lib is incompatible with standard.*', '.*checklib: error: library .*epoc32.release.winscw.urel.t_oelib.lib is incompatible with Symbian.*', '.*checklib: error: library .*epoc32.release.winscw.udeb.t_oelib.lib is incompatible with Symbian.*', '.*checklib: error: library .*epoc32.release.winscw.udeb.symbian_test.lib is incompatible with standard.*', '.*armlink.*oe_exe_without_stdcpp.*scppnwdl.dso.*', '.*armlink.*symbian_exe_with_stdcpp.*stdnew.dso.*', '.*armlink.*oedll.*stdnew.dso.*', '.*armlink.*oeexe.*stdnew.dso.*', '.*armlink.*symbian_newlib.exe.*scppnwdl.dso.*' ] t.mustnotmatch = [ '.*armlink.*oe_exe_without_stdcpp.*stdnew.dso.*', '.*armlink.*symbian_exe_with_stdcpp.*scppnwdl.dso.*', '.*armlink.*oedll.*scppnwdl.dso.*', '.*armlink.*oeexe.*scppnwdl.dso.*', '.*armlink.*symbian_newlib.exe.*stdnew.dso.*', '.*mwldsym2.*scppnwdl.lib.*symbian_exe_with_stdcpp.exe.*' ] else: # these files will build for 9.4 t.targets.extend([ "$(EPOCROOT)/epoc32/release/winscw/urel/wrong_newlib_test_oeexe.exe", "$(EPOCROOT)/epoc32/release/winscw/urel/wrong_newlib_test_oeexe.exe.map", "$(EPOCROOT)/epoc32/release/winscw/udeb/wrong_newlib_test_oeexe.exe", "$(EPOCROOT)/epoc32/release/winscw/udeb/wrong_newlib_test_oeexe.exe.map", "$(EPOCROOT)/epoc32/release/winscw/urel/wrong_newlib_test_seexe.exe", "$(EPOCROOT)/epoc32/release/winscw/urel/wrong_newlib_test_seexe.exe.map", "$(EPOCROOT)/epoc32/release/winscw/udeb/wrong_newlib_test_seexe.exe", "$(EPOCROOT)/epoc32/release/winscw/udeb/wrong_newlib_test_seexe.exe.map", "$(EPOCROOT)/epoc32/release/armv5/urel/wrong_newlib_test_oeexe.exe", "$(EPOCROOT)/epoc32/release/armv5/udeb/wrong_newlib_test_oeexe.exe", "$(EPOCROOT)/epoc32/release/armv5/urel/wrong_newlib_test_seexe.exe", "$(EPOCROOT)/epoc32/release/armv5/udeb/wrong_newlib_test_seexe.exe", "$(EPOCROOT)/epoc32/release/armv5/urel/wrong_newlib_test_oeexe.exe.map", "$(EPOCROOT)/epoc32/release/armv5/udeb/wrong_newlib_test_oeexe.exe.map", "$(EPOCROOT)/epoc32/release/armv5/urel/wrong_newlib_test_seexe.exe.map", "$(EPOCROOT)/epoc32/release/armv5/udeb/wrong_newlib_test_seexe.exe.map", "$(EPOCROOT)/epoc32/release/armv5/urel/wrong_newlib_test_oeexe.exe.sym", "$(EPOCROOT)/epoc32/release/armv5/udeb/wrong_newlib_test_oeexe.exe.sym", "$(EPOCROOT)/epoc32/release/armv5/urel/wrong_newlib_test_seexe.exe.sym", "$(EPOCROOT)/epoc32/release/armv5/udeb/wrong_newlib_test_seexe.exe.sym" ]) t.run() return t
def run(): t = SmokeTest() t.description = "Test the passing of parameters to log filters" command = "sbs -b smoke_suite/test_resources/simple/bld.inf -c armv5_urel --filters=" # no parameters means count all tags t.name = "filter_params_all_tags" t.command = command + "FilterTagCounter" t.mustmatch_singleline = [ "^info \d+ \d+", "^whatlog \d+ \d+", "^clean \d+ \d+" ] t.run() # empty parameter lists are valid t.name = "filter_params_all_tags2" t.command = command + "FilterTagCounter[]" t.run() # parameters mean report only those tags t.name = "filter_params_info" t.command = command + "FilterTagCounter[info]" t.mustmatch_singleline = ["^info \d+ \d+"] t.mustnotmatch_singleline = ["^whatlog \d+ \d+", "^clean \d+ \d+"] t.run() # multiple parameters are valid t.name = "filter_params_info_clean" t.command = command + "FilterTagCounter[info,clean]" t.mustmatch_singleline = ["^info \d+ \d+", "^clean \d+ \d+"] t.mustnotmatch_singleline = ["^whatlog \d+ \d+"] t.run() # using the same filter with different parameters is valid t.name = "filter_params_info_clean2" t.command = command + "FilterTagCounter[info],FilterTagCounter[clean]" t.run() # using the same filter with the same parameters is valid too t.name = "filter_params_info_clean3" t.command = command + "FilterTagCounter[info,clean],FilterTagCounter[info,clean]" t.run() # parameters must work with the sbs_filter script as well command = "sbs_filter --filters={0} < smoke_suite/test_resources/logexamples/filter_component.log" t.logfileOption = lambda: "" t.makefileOption = lambda: "" # should still work with no parameters t.name = "sbs_filter_no_params" t.command = command.format("FilterComp") t.mustmatch_singleline = [] t.mustnotmatch_singleline = [ "[<>]" # no elements should be printed at all as no bld.inf is selected ] t.run() # should work with an empty parameter list t.name = "sbs_filter_no_params2" t.command = command.format("FilterComp[]") t.run() # with a parameter t.name = "sbs_filter_one_param" t.command = command.format("FilterComp[email]") t.stdout = [ "<error bldinf='y:/src/email/bld.inf'>email error #1</error>", "<error bldinf='y:/src/email/bld.inf'>email error #2</error>", "<warning bldinf='y:/src/email/bld.inf'>email warning #1</warning>", "<warning bldinf='y:/src/email/bld.inf'>email warning #2</warning>", "<whatlog bldinf='y:/src/email/bld.inf' config='armv5_urel' mmp='y:/src/email/a.mmp'>", "<build>/epoc32/data/email_1</build>", "<build>/epoc32/data/email_2</build>", "</whatlog>", "<recipe bldinf='y:/src/email/bld.inf' name='dummy'>", "+ make_email", "email was made fine", "<status exit='ok'></status>", "</recipe>", "<fake bldinf='y:src/email/bld.inf'>", " <foo>", " <bar>", " <fb>fb email</fb>", " </bar>", " </foo>", "</fake>" ] t.mustmatch_singleline = [] t.mustnotmatch_singleline = [] t.warnings = 2 t.errors = 2 t.run() # with multiple filters t.name = "sbs_filter_multi" t.command = command.format("FilterComp[txt],FilterTagCounter[file,recipe]") t.stdout = [] t.mustmatch_singleline = ["txt", "^file \d+", "^recipe \d+"] t.mustnotmatch_singleline = ["email"] t.warnings = 2 t.errors = 0 t.run() t.name = "filter_params" t.print_result() return t
def run(): t = SmokeTest() t.description = "This testcase tests all mmp keywords including new implementation of 'paged/unpaged code/data'" t.usebash = True t.name = "mmp_paging_keywords" t.command = "sbs -b smoke_suite/test_resources/mmp/mmp1/group/bld.inf -c armv5 -f-" t.targets = [ "$(EPOCROOT)/epoc32/release/armv5/udeb/shutdownsrv.dll", "$(EPOCROOT)/epoc32/release/armv5/udeb/shutdownsrv.dll.map", "$(EPOCROOT)/epoc32/release/armv5/urel/shutdownsrv.dll", "$(EPOCROOT)/epoc32/release/armv5/urel/shutdownsrv.dll.map", "$(EPOCROOT)/epoc32/release/armv5/lib/exportlibrary_shutdownsrv.dso", "$(EPOCROOT)/epoc32/release/armv5/lib/exportlibrary_shutdownsrv{000a0000}.dso", ] t.addbuildtargets("smoke_suite/test_resources/mmp/mmp1/group/bld.inf", [ "shutdownsrv_dll/armv5/udeb/shutdownsrv.o", "shutdownsrv_dll/armv5/urel/shutdownsrv.o", "shutdownsrv_dll/armv5/udeb/shutdownsrvpatchdata.o", "shutdownsrv_dll/armv5/urel/shutdownsrvpatchdata.o", "shutdownsrv_dll/armv5/udeb/shutdowntimer.o", "shutdownsrv_dll/armv5/urel/shutdowntimer.o" ]) t.mustmatch = [ ".*elf2e32.*(--defaultpaged|--codepaging=default.*--datapaging=default).*", ".*armlink.*--verbose.*" ] t.run() t.name = "mmp_option_armcc_and_armasm" t.command = "sbs -b smoke_suite/test_resources/mmp/mmp2/group/bld.inf -c armv5 -f-" t.targets = [ "$(EPOCROOT)/epoc32/release/armv5/udeb/imageprocessorperf.lib", "$(EPOCROOT)/epoc32/release/armv5/urel/imageprocessorperf.lib" ] t.addbuildtargets("smoke_suite/test_resources/mmp/mmp2/group/bld.inf", [ "imageprocessorperf_lib/armv5/udeb/ColorConverter.o", "imageprocessorperf_lib/armv5/urel/ColorConverter.o", "imageprocessorperf_lib/armv5/udeb/ImageProcessor.o", "imageprocessorperf_lib/armv5/urel/ImageProcessor.o" ]) t.mustmatch = [ ".*armcc.*-O0.*-g.*--cpu 6.*-Otime.*", ".*armcc.*-O3.*--cpu 6.*-Otime.*", ".*OPTION ARMASM has no effect.*", ".*OPTION_REPLACE ARMASM has no effect.*" ] t.mustnotmatch = [ ".*armcc.*--export_all_vtbl.*" ] t.warnings = 2 t.run() t.name = "mmp_option_gcce_linkeroption_gcce" t.command = "sbs -b smoke_suite/test_resources/mmp/options/bld.inf -c arm.v5.urel.gcce4_4_1.release_gcce -f-" t.targets = [ "$(EPOCROOT)/epoc32/release/gcce/urel/test.exe", ] t.mustmatch = [] t.mustmatch_singleline = [ ".*g\+\+.*-c.*-O3.*-fvisibility-inlines-hidden.*", ".*g\+\+.* -Wl,--verbose -Wl,-pie .*" ] t.mustnotmatch = [ ".*g\+\+.*-c.* -Wl,--verbose -Wl,-pie .*" ] t.warnings = 0 t.run() # LINKEROPTION CW can impact DLL (and variants), EXE and LIB TARGETTYPEs in different ways # We ensure we have enough build coverage to cover all linker calls constructed in the win32 FLM t.name = "mmp_option_cw_linkeroption_cw" t.command = "sbs -b smoke_suite/test_resources/mmp/options/bld.inf -c winscw_urel -f-" t.targets = [ "$(EPOCROOT)/epoc32/release/winscw/urel/test.exe", ] t.mustmatch = [] t.mustmatch_singleline = [] t.countmatch = [ [".*mwccsym2.*-relax_pointers.*-O2", 5], [".*mwldsym2.*-zerobss.*-export none", 2], [".*mwldsym2.*-zerobss.*-fold all", 2] ] t.warnings = 0 t.run() t.countmatch = [] t.name = "mmp_debuglibrary" t.command = "sbs -b smoke_suite/test_resources/mmp/mmp3/bld.inf -c armv5 -c winscw -f-" t.targets = [ "$(EPOCROOT)/epoc32/release/armv5/udeb/tbm.exe", "$(EPOCROOT)/epoc32/release/armv5/udeb/tbm.exe.map", "$(EPOCROOT)/epoc32/release/armv5/urel/tbm.exe", "$(EPOCROOT)/epoc32/release/armv5/urel/tbm.exe.map", "$(EPOCROOT)/epoc32/release/armv5/udeb/t_oom.exe", "$(EPOCROOT)/epoc32/release/armv5/udeb/t_oom.exe.map", "$(EPOCROOT)/epoc32/release/armv5/urel/t_oom.exe", "$(EPOCROOT)/epoc32/release/armv5/urel/t_oom.exe.map", "$(EPOCROOT)/epoc32/release/armv5/udeb/dfpaeabi_vfpv2.dll", "$(EPOCROOT)/epoc32/release/armv5/udeb/dfpaeabi_vfpv2.dll.map", "$(EPOCROOT)/epoc32/release/armv5/urel/dfpaeabi_vfpv2.dll", "$(EPOCROOT)/epoc32/release/armv5/urel/dfpaeabi_vfpv2.dll.map", "$(EPOCROOT)/epoc32/release/winscw/urel/t_oom.exe", "$(EPOCROOT)/epoc32/release/winscw/urel/t_oom.exe.map", "$(EPOCROOT)/epoc32/release/winscw/udeb/t_oom.exe" ] t.addbuildtargets("smoke_suite/test_resources/mmp/mmp3/bld.inf", [ "tbm_exe/armv5/udeb/tbm.o", "tbm_exe/armv5/urel/tbm.o", "t_oom_exe/armv5/udeb/t_oom.o", "t_oom_exe/armv5/urel/t_oom.o", "dfpaeabi_vfpv2_dll/armv5/udeb/dfpaeabi.o", "dfpaeabi_vfpv2_dll/armv5/urel/dfpaeabi.o", "t_oom_exe/winscw/udeb/t_oom.o", "t_oom_exe/winscw/udeb/t_oom_UID_.o", "t_oom_exe/winscw/urel/t_oom.o", "t_oom_exe/winscw/urel/t_oom_UID_.o" ]) t.mustmatch = [ ".*armlink.*udeb/eexe.lib.*-o.*armv5/udeb/t_oom.exe.sym.*euser.dso.*efsrv.dso.*estor.dso.*euser.dso.*", ".*armlink.*urel/eexe.lib.*-o.*armv5/urel/t_oom.exe.sym.*euser.dso.*efsrv.dso.*euser.dso.*", ".*mwldsym2.*udeb/eexe.lib.*euser.lib.*efsrv.lib.*estor.lib.*euser.lib.*-o.*winscw/udeb/t_oom.exe.*", ".*mwldsym2.*urel/eexe.lib.*euser.lib.*efsrv.lib.*euser.lib.*-o.*winscw/urel/t_oom.exe.*" ] t.mustnotmatch = [] t.warnings = 0 t.run() t.name = "mmp_basedefault" t.command = "sbs -b smoke_suite/test_resources/mmp/mmp4/group/bld.inf -c winscw" t.targets = [ "$(EPOCROOT)/epoc32/release/winscw/udeb/d_newldd.ldd", "$(EPOCROOT)/epoc32/release/winscw/urel/d_newldd.ldd", "$(EPOCROOT)/epoc32/release/winscw/udeb/d_lddturnaroundtimertest.ldd", "$(EPOCROOT)/epoc32/release/winscw/urel/d_lddturnaroundtimertest.ldd", "$(EPOCROOT)/epoc32/release/winscw/urel/d_lddturnaroundtimertest.ldd.map", "$(EPOCROOT)/epoc32/release/winscw/udeb/t_sharedio3.exe", "$(EPOCROOT)/epoc32/release/winscw/urel/t_sharedio3.exe", "$(EPOCROOT)/epoc32/release/winscw/urel/t_sharedio3.exe.map", "$(EPOCROOT)/epoc32/release/winscw/udeb/t_rbuf.exe", "$(EPOCROOT)/epoc32/release/winscw/urel/t_rbuf.exe", "$(EPOCROOT)/epoc32/release/winscw/urel/t_rbuf.exe.map" ] t.addbuildtargets("smoke_suite/test_resources/mmp/mmp4/group/bld.inf", [ "d_newldd_ldd/winscw/udeb/d_newldd.o", "d_newldd_ldd/winscw/udeb/d_newldd.UID.CPP", "d_newldd_ldd/winscw/udeb/d_newldd_UID_.o", "d_newldd_ldd/winscw/urel/d_newldd.o", "d_newldd_ldd/winscw/urel/d_newldd.UID.CPP", "d_newldd_ldd/winscw/urel/d_newldd_UID_.o", "d_newldd_ldd/winscw/udeb/t_new_classes.o", "d_newldd_ldd/winscw/urel/t_new_classes.o", "d_lddturnaroundtimertest_ldd/winscw/udeb/d_lddturnaroundtimertest.o", "d_lddturnaroundtimertest_ldd/winscw/udeb/d_lddturnaroundtimertest.UID.CPP", "d_lddturnaroundtimertest_ldd/winscw/udeb/d_lddturnaroundtimertest_UID_.o", "d_lddturnaroundtimertest_ldd/winscw/urel/d_lddturnaroundtimertest.o", "d_lddturnaroundtimertest_ldd/winscw/urel/d_lddturnaroundtimertest.UID.CPP", "d_lddturnaroundtimertest_ldd/winscw/urel/d_lddturnaroundtimertest_UID_.o", "t_sharedio3_exe/winscw/udeb/t_sharedio.o", "t_sharedio3_exe/winscw/udeb/t_sharedio3.UID.CPP", "t_sharedio3_exe/winscw/udeb/t_sharedio3_UID_.o", "t_sharedio3_exe/winscw/urel/t_sharedio.o", "t_sharedio3_exe/winscw/urel/t_sharedio3.UID.CPP", "t_sharedio3_exe/winscw/urel/t_sharedio3_UID_.o", "t_rbuf_exe/winscw/udeb/t_rbuf.o", "t_rbuf_exe/winscw/udeb/t_rbuf.UID.CPP", "t_rbuf_exe/winscw/udeb/t_rbuf_UID_.o", "t_rbuf_exe/winscw/urel/t_rbuf.o", "t_rbuf_exe/winscw/urel/t_rbuf.UID.CPP", "t_rbuf_exe/winscw/urel/t_rbuf_UID_.o" ]) t.mustmatch = [] t.run() # Test keywords: version, firstlib, nocompresstarget t.name = "mmp_version_firstlib_nocompresstarget" t.command = "sbs -b smoke_suite/test_resources/mmp/mmp5/bld.inf -c armv5" t.targets = [ "$(EPOCROOT)/epoc32/release/armv5/udeb/fuzzv5.exe", "$(EPOCROOT)/epoc32/release/armv5/urel/fuzzv5.exe", "$(EPOCROOT)/epoc32/release/armv5/udeb/fuzzlib.lib", "$(EPOCROOT)/epoc32/release/armv5/urel/fuzzlib.lib" ] t.addbuildtargets("smoke_suite/test_resources/mmp/mmp5/bld.inf", [ "fuzzv5_exe/armv5/udeb/fuzzv5.o", "fuzzv5_exe/armv5/urel/fuzzv5.o", "fuzzlib_lib/armv5/udeb/uc_exe_.cpp", "fuzzlib_lib/armv5/urel/uc_exe_.cpp", "fuzzlib_lib/armv5/udeb/uc_exe_.o", "fuzzlib_lib/armv5/urel/uc_exe_.o", ]) t.run() t.name = "mmp_diagsuppress_armlibs" t.command = "sbs -b smoke_suite/test_resources/mmp/mmp6_7/bld.inf -c armv5 -k -p diagsuppress.mmp -f-" t.targets = [ "$(EPOCROOT)/epoc32/release/armv5/udeb/diagsuppress_test.dll", "$(EPOCROOT)/epoc32/release/armv5/urel/diagsuppress_test.dll", ] t.mustmatch = [ "--diag_suppress 6780", "--diag_suppress 6331" ] t.run() t.name = "mmp_diagsuppress_no_armlibs" t.command = "sbs -b smoke_suite/test_resources/mmp/mmp6_7/bld.inf -c armv5 -k -p diagsuppress_noarmlibs.mmp -f-" t.targets = [ "$(EPOCROOT)/epoc32/release/armv5/urel/diagsuppress_noarmlibs_test.dll", "$(EPOCROOT)/epoc32/release/armv5/udeb/diagsuppress_noarmlibs_test.dll" ] t.mustmatch = ["--diag_suppress 6331"] t.mustnotmatch = ["--diag_suppress 6780"] t.run() # Test keyword: version t.name = "mmp_version_keyword" t.command = "sbs -b smoke_suite/test_resources/mmp/mmp8/bld.inf" t.targets = [ "$(EPOCROOT)/epoc32/release/armv5/urel/test_mmp_version.exe", "$(EPOCROOT)/epoc32/release/armv5/udeb/test_mmp_version.exe", "$(EPOCROOT)/epoc32/release/winscw/urel/test_mmp_version.exe", "$(EPOCROOT)/epoc32/release/winscw/udeb/test_mmp_version.exe" ] t.mustmatch = [] t.mustnotmatch = [] t.warnings = 2 t.run() # Test keyword: armfpu softvfp|vfpv2 # Both armv5 RVCT and GCCE builds are covered, as they differ in behaviour. t.name = "mmp_armfpu_softvfp_rvct" t.command = "sbs -b $(SBS_HOME)/test/smoke_suite/test_resources/mmp/mmp9_10/bld.inf -p armfpu_soft.mmp -c armv5_urel -f-" t.targets = [] t.mustmatch = ["--fpu softvfp", "--fpu=softvfp"] t.mustnotmatch = ["--fpu vfpv2", "--fpu softvfp\+", "--fpu=vfpv2", "--fpu=softvfp\+"] t.warnings = 0 t.run() t.name = "mmp_armfpu_vfpv2_rvct" t.command = "sbs -b $(SBS_HOME)/test/smoke_suite/test_resources/mmp/mmp9_10/bld.inf -c armv5_urel REALLYCLEAN &&" \ + " sbs -b $(SBS_HOME)/test/smoke_suite/test_resources/mmp/mmp9_10/bld.inf -p armfpu_vfpv2.mmp -c armv5_urel -f-" t.mustmatch = ["--fpu vfpv2", "--fpu=vfpv2"] t.mustnotmatch = ["--fpu softvfp", "--fpu=softvfp"] t.run() t.name = "mmp_armfpu_softvfp+vfpv2_rvct" t.command = "sbs -b $(SBS_HOME)/test/smoke_suite/test_resources/mmp/mmp9_10/bld.inf -c armv5_urel REALLYCLEAN &&" \ + " sbs -b $(SBS_HOME)/test/smoke_suite/test_resources/mmp/mmp9_10/bld.inf -p \"armfpu_soft+vfpv2.mmp\" -c armv5_urel -f-" t.mustmatch = ["--fpu softvfp\+vfpv2", "--fpu=vfpv2"] t.mustnotmatch = ["--fpu vfpv2", "--fpu softvfp ", "--fpu=softvfp"] t.run() t.name = "mmp_armfpu_softvfp+vfpv2_gcce" t.command = "sbs -b $(SBS_HOME)/test/smoke_suite/test_resources/mmp/mmp9_10/bld.inf -c armv5_urel_gcce4_3_2 REALLYCLEAN &&" \ + " sbs -b $(SBS_HOME)/test/smoke_suite/test_resources/mmp/mmp9_10/bld.inf -c armv5_urel_gcce4_3_2 -f-" t.countmatch = [ ["-mfloat-abi=soft", 3], ["--fpu=softvfp", 3] # gcce doesn't vary according to ARMFPU currently ] t.mustmatch = [] t.mustnotmatch = ["--fpu=vfpv2", "--fpu=softvfp\+"] t.run() t.name = "mmp_armfpu_softvfp+vfpv3_rvct" t.command = "sbs -b $(SBS_HOME)/test/smoke_suite/test_resources/mmp/mmp9_10/bld2.inf -c arm.v5.urel.rvct4_0 REALLYCLEAN &&" \ + " sbs -b $(SBS_HOME)/test/smoke_suite/test_resources/mmp/mmp9_10/bld2.inf -c arm.v5.urel.rvct4_0 -f- --mo=-n" t.countmatch = [ ["elf2e32.*--fpu=vfpv3", 1], ["armcc.*--fpu.softvfp\+vfpv3", 1] ] t.mustmatch = [] t.mustnotmatch = ["--fpu=vfpv2", "--fpu=softvfp\+"] t.run() t.name = "mmp_armfpu_softvfp+vfpv3_gcce" t.command = "sbs -b $(SBS_HOME)/test/smoke_suite/test_resources/mmp/mmp9_10/bld2.inf -c armv5_urel_gcce4_4_1 REALLYCLEAN &&" \ + " sbs -b $(SBS_HOME)/test/smoke_suite/test_resources/mmp/mmp9_10/bld2.inf -c armv5_urel_gcce4_4_1 -f- --mo=-n" t.countmatch = [ ["g\+\+.*-mfloat-abi=soft", 1], ["elf2e32.*--fpu=softvfp", 1] # gcce doesn't vary according to ARMFPU currently ] t.mustmatch = [] t.mustnotmatch = ["--fpu=vfpv2", "--fpu=softvfp\+"] t.run() # Test keywords: compresstarget, nocompresstarget, bytepaircompresstarget, inflatecompresstarget t.name = "mmp_byte_compression_target_keywords" t.command = "sbs -b $(SBS_HOME)/test/smoke_suite/test_resources/mmp/mmp11/bld.inf -c armv5_urel -f-" t.mustmatch_singleline = [ "elf2e32.*--output.*\/compress\.exe.*--compressionmethod=inflate", "elf2e32.*--output.*\/nocompress\.exe.*--uncompressed", "elf2e32.*--output.*\/bytepaircompress\.exe.*--compressionmethod=bytepair", "elf2e32.*--output.*\/inflatecompress\.exe.*--compressionmethod=inflate", "elf2e32.*--output.*\/combinedcompress\.exe.*--compressionmethod=bytepair", "COMPRESSTARGET keyword in .*combinedcompresstarget.mmp overrides earlier use of NOCOMPRESSTARGET", "INFLATECOMPRESSTARGET keyword in .*combinedcompresstarget.mmp overrides earlier use of COMPRESSTARGET", "BYTEPAIRCOMPRESSTARGET keyword in .*combinedcompresstarget.mmp overrides earlier use of INFLATECOMPRESSTARGET" ] t.countmatch = [] t.mustnotmatch = [] t.warnings = 3 t.run() # Test keyword: APPLY t.name = "mmp_apply" t.command = "sbs -b smoke_suite/test_resources/mmp/apply/bld.inf -f- -k --configpath=test/config" t.targets = [ "$(EPOCROOT)/epoc32/release/armv5/urel/test_mmp_apply.exe", "$(EPOCROOT)/epoc32/release/armv5/udeb/test_mmp_apply.exe", "$(EPOCROOT)/epoc32/release/winscw/urel/test_mmp_apply.exe", "$(EPOCROOT)/epoc32/release/winscw/udeb/test_mmp_apply.exe" ] t.mustmatch_singleline = ["-DAPPLYTESTEXPORTEDVAR", "-DAPPLYTESTAPPENDCDEFS", "-DSINGLE=1", "-DDOUBLE"] t.countmatch = [["<error.*APPLY unknown variant 'no_such_var'", 2], ["<error.*MACRO names cannot start with a digit '2'", 2]] t.errors = 2 # no_such_var for armv5 and winscw t.errors += 2 # macro '2' error for armv5 and winscw t.warnings = 0 t.returncode = 1 t.run() # Test keyword: EPOCNESTEDEXCEPTIONS t.name = "mmp_epocnestedexceptions" t.command = "sbs -b smoke_suite/test_resources/mmp/epocnestedexceptions/bld.inf -c armv5_udeb -f-" # When EPOCNESTEDEXCEPTIONS is specified in the MMP file, a different static # run-time library should be used. t.mustmatch_singleline = ["usrt_nx_\d_\d\.lib"] t.mustnotmatch = ["usrt._.."] t.countmatch = [] # The new static run-time libraries don't yet exist. t.errors = 1 t.warnings = 1 t.targets = [] t.run() # Test keyword: DOCUMENT t.name = "mmp_keyword_document" # Note: in t.command, the makefile is cat'd through sed to remove the .DEFAULT double-colon rule's <warning> tag to ensure that t.run succeeds. t.command = "sbs -b smoke_suite/test_resources/mmp/mmp1/group/bld.inf -c armv5 reallyclean; " + \ "sbs -b smoke_suite/test_resources/mmp/mmp1/group/bld.inf --no-depend-generate -c armv5_urel -m ${SBSMAKEFILE}; " + \ "cat ${SBSMAKEFILE}_all.default" t.mustmatch_singleline = ["DOCUMENT:=.*test/smoke_suite/test_resources/mmp/mmp1/src/file01\.txt\\s+.*test/smoke_suite/test_resources/mmp/mmp1/src/file02\.txt"] t.mustnotmatch = [] t.countmatch = [] t.errors = 0 t.warnings = 0 t.returncode = 0 t.targets = [] t.run() t.name = "mmp_keywords" t.print_result() return t
def run(): t = SmokeTest() t.usebash = True result = SmokeTest.PASS abs_epocroot = os.path.abspath(os.environ["EPOCROOT"]) cwd = os.getcwd().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 {0} -m ${{SBSMAKEFILE}} -f ${{SBSLOGFILE}} what && " + \ "EPOCROOT='{0}' sbs_filter --filters FilterWhatComp < ${{{{SBSLOGFILE}}}} &&".format(relative_epocroot) + \ "EPOCROOT='{0}' sbs_filter --filters FilterWhatComp < ${{{{SBSLOGFILE}}}}".format(abs_epocroot) targets = [] buildtargets = [] mustmatch_pre = [ "-- abld -w", ".*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"] warnings = 0 t.name = "whatcomp_basic" t.description = description t.command = command.format("arm.v5.urel.gcce4_4_1") t.targets = targets t.mustmatch = mustmatch t.mustnotmatch = mustnotmatch t.warnings = warnings t.run() t.name = "whatcomp_component_repeated" t.description = """ It is possible for what information about a component to not be grouped (i.e. for multiple whatlogs tags relating to a single component to be interspersed with whatlog tags relating to other components). Raptor must cope with that and must *not* report missing files under the wrong component name.""" t.command = "sbs_filter --filters=FilterWhatComp < smoke_suite/test_resources/logexamples/what_component_repeated.log" t.targets = [] t.mustmatch = [] t.mustmatch_multiline = [ "Chdir y:.ext.app.emailwizard.*epoc32.data.something.*" + "Chdir y:.sf.mw.gsprofilesrv.ftuwizardmodel.*epoc32.release.armv5.something.*" + "Chdir y:.ext.app.emailwizard.*epoc32.data.something_else" ] t.mustnotmatch = [] t.warnings = 0 t.run() t.name = "whatcomp" t.print_result() return t
def run(): t = SmokeTest() t.description = "Ensure Raptor builds Qt applications which use moc, uic and other tools" t.id = "0110a" t.name = "qt_lotto" # Its using rvct4_0 because that's the 10.1 default. t.command = "sbs --qtpro smoke_suite/test_resources/qt/lotto/LottoNumberPicker.pro -k -c arm.v5.urel.rvct4_0 -c winscw" t.targets = [ "$(EPOCROOT)/epoc32/data/z/private/10003a3f/import/apps/lottonumberpicker_reg.rsc", "$(EPOCROOT)/epoc32/data/z/resource/apps/lottonumberpicker.rsc", "$(EPOCROOT)/epoc32/include/lottonumberpicker.rsg", "$(EPOCROOT)/epoc32/release/armv5/urel/lottonumberpicker.exe", "$(EPOCROOT)/epoc32/release/armv5/urel/lottonumberpicker.exe.map", "$(EPOCROOT)/epoc32/release/winscw/udeb/lottonumberpicker.exe", "$(EPOCROOT)/epoc32/release/winscw/udeb/z/private/10003a3f/import/apps/lottonumberpicker_reg.rsc", "$(EPOCROOT)/epoc32/release/winscw/udeb/z/resource/apps/lottonumberpicker.rsc", "$(EPOCROOT)/epoc32/release/winscw/urel/lottonumberpicker.exe", "$(EPOCROOT)/epoc32/release/winscw/urel/lottonumberpicker.exe.map", "$(EPOCROOT)/epoc32/release/winscw/urel/z/private/10003a3f/import/apps/lottonumberpicker_reg.rsc", "$(EPOCROOT)/epoc32/release/winscw/urel/z/resource/apps/lottonumberpicker.rsc", "$(SBS_HOME)/test/smoke_suite/test_resources/qt/lotto/.make.cache", "$(SBS_HOME)/test/smoke_suite/test_resources/qt/lotto/LottoNumberPicker_0x20029F39.mmp", "$(SBS_HOME)/test/smoke_suite/test_resources/qt/lotto/Makefile", "$(SBS_HOME)/test/smoke_suite/test_resources/qt/lotto/bld.inf", "$(SBS_HOME)/test/smoke_suite/test_resources/qt/lotto/lottonumberpicker.loc", "$(SBS_HOME)/test/smoke_suite/test_resources/qt/lotto/lottonumberpicker.rss", "$(SBS_HOME)/test/smoke_suite/test_resources/qt/lotto/lottonumberpicker_installer.pkg", "$(SBS_HOME)/test/smoke_suite/test_resources/qt/lotto/lottonumberpicker_reg.rss", "$(SBS_HOME)/test/smoke_suite/test_resources/qt/lotto/lottonumberpicker_template.pkg", "$(SBS_HOME)/test/smoke_suite/test_resources/qt/lotto/moc_lottonumberpicker.cpp", "$(SBS_HOME)/test/smoke_suite/test_resources/qt/lotto/moc_lottonumberpicker.cpp", "$(SBS_HOME)/test/smoke_suite/test_resources/qt/lotto/ui_lottonumberpicker.h" ] t.addbuildtargets('smoke_suite/test_resources/qt/lotto/bld.inf', [ "lottonumberpicker_exe/armv5/urel/integerpair.o", "lottonumberpicker_exe/armv5/urel/integerpair.o.d", "lottonumberpicker_exe/armv5/urel/lottonumberpicker.o", "lottonumberpicker_exe/armv5/urel/lottonumberpicker.o.d", "lottonumberpicker_exe/armv5/urel/lottonumberpicker_urel_objects.via", "lottonumberpicker_exe/armv5/urel/main.o", "lottonumberpicker_exe/armv5/urel/main.o.d", "lottonumberpicker_exe/armv5/urel/moc_lottonumberpicker.o", "lottonumberpicker_exe/armv5/urel/moc_lottonumberpicker.o.d", "lottonumberpicker_exe/lottonumberpicker_lottonumberpicker.rsc", "lottonumberpicker_exe/lottonumberpicker_lottonumberpicker.rsc.d", "lottonumberpicker_exe/lottonumberpicker_lottonumberpicker.rsc.rpp", "lottonumberpicker_exe/winscw/udeb/integerpair.dep", "lottonumberpicker_exe/winscw/udeb/integerpair.o", "lottonumberpicker_exe/winscw/udeb/integerpair.o.d", "lottonumberpicker_exe/winscw/udeb/lottonumberpicker.UID.CPP", "lottonumberpicker_exe/winscw/udeb/lottonumberpicker.dep", "lottonumberpicker_exe/winscw/udeb/lottonumberpicker.o", "lottonumberpicker_exe/winscw/udeb/lottonumberpicker.o.d", "lottonumberpicker_exe/winscw/udeb/lottonumberpicker_UID_.dep", "lottonumberpicker_exe/winscw/udeb/lottonumberpicker_UID_.o", "lottonumberpicker_exe/winscw/udeb/lottonumberpicker_UID_.o.d", "lottonumberpicker_exe/winscw/udeb/main.dep", "lottonumberpicker_exe/winscw/udeb/main.o", "lottonumberpicker_exe/winscw/udeb/main.o.d", "lottonumberpicker_exe/winscw/udeb/moc_lottonumberpicker.dep", "lottonumberpicker_exe/winscw/udeb/moc_lottonumberpicker.o", "lottonumberpicker_exe/winscw/udeb/moc_lottonumberpicker.o.d", "lottonumberpicker_exe/winscw/urel/integerpair.dep", "lottonumberpicker_exe/winscw/urel/integerpair.o", "lottonumberpicker_exe/winscw/urel/integerpair.o.d", "lottonumberpicker_exe/winscw/urel/lottonumberpicker.UID.CPP", "lottonumberpicker_exe/winscw/urel/lottonumberpicker.dep", "lottonumberpicker_exe/winscw/urel/lottonumberpicker.o", "lottonumberpicker_exe/winscw/urel/lottonumberpicker.o.d", "lottonumberpicker_exe/winscw/urel/lottonumberpicker_UID_.dep", "lottonumberpicker_exe/winscw/urel/lottonumberpicker_UID_.o", "lottonumberpicker_exe/winscw/urel/lottonumberpicker_UID_.o.d", "lottonumberpicker_exe/winscw/urel/main.dep", "lottonumberpicker_exe/winscw/urel/main.o", "lottonumberpicker_exe/winscw/urel/main.o.d", "lottonumberpicker_exe/winscw/urel/moc_lottonumberpicker.dep", "lottonumberpicker_exe/winscw/urel/moc_lottonumberpicker.o", "lottonumberpicker_exe/winscw/urel/moc_lottonumberpicker.o.d", "lottonumberpicker_reg_exe/lottonumberpicker_reg_lottonumberpicker_reg.rsc", "lottonumberpicker_reg_exe/lottonumberpicker_reg_lottonumberpicker_reg.rsc.d", "lottonumberpicker_reg_exe/lottonumberpicker_reg_lottonumberpicker_reg.rsc.rpp" ]) t.run() return t
def run(): t = SmokeTest() t.usebash = True result = SmokeTest.PASS description = "Validates the --no-metadata-depend option" base_command = "sbs -b smoke_suite/test_resources/simple/bld.inf" targets = [ "$(EPOCROOT)/epoc32/release/armv5/urel/test.exe", "$(EPOCROOT)/epoc32/release/armv5/urel/test.exe.map", "$(EPOCROOT)/epoc32/release/armv5/urel/test.exe.sym", ] buildtargets = [ "test_/armv5/urel/test.o", "test_/armv5/urel/test.o.d", "test_/armv5/urel/test3.o.d", "test_/armv5/urel/test4.o.d", "test_/armv5/urel/test5.o.d", "test_/armv5/urel/test1.o.d", "test_/armv5/urel/test6.o.d", "test_/armv5/urel/test2.o.d", "test_/armv5/urel/test3.o", "test_/armv5/urel/test4.o", "test_/armv5/urel/test5.o", "test_/armv5/urel/test1.o", "test_/armv5/urel/test6.o", "test_/armv5/urel/test2.o", "test_/armv5/urel/test_.o", "test_/armv5/urel/test_urel_objects.via" ] mustmatch = [ ] # Initial build of simple.exe to get all the files in place t.name = "initial_build" t.description = "Initial build" t.command = "{0} -c arm.v5.urel.gcce4_4_1".format(base_command) t.targets = targets t.addbuildtargets("smoke_suite/test_resources/simple/bld.inf", buildtargets) t.mustmatch = [ "compile.*smoke_suite.test_resources.simple.test.cpp.*\[arm.v5.urel.gcce4_4_1\]", "compile.*smoke_suite.test_resources.simple.test.cia.*\[arm.v5.urel.gcce4_4_1\]", "compile.*smoke_suite.test_resources.simple.test1.c\+\+.*\[arm.v5.urel.gcce4_4_1\]", "compile.*smoke_suite.test_resources.simple.test2.cxx.*\[arm.v5.urel.gcce4_4_1\]", "compile.*smoke_suite.test_resources.simple.test3.Cpp.*\[arm.v5.urel.gcce4_4_1\]", "compile.*smoke_suite.test_resources.simple.test4.cc.*\[arm.v5.urel.gcce4_4_1\]", "compile.*smoke_suite.test_resources.simple.test5.CC.*\[arm.v5.urel.gcce4_4_1\]", "compile.*smoke_suite.test_resources.simple.test6.C\+\+.*\[arm.v5.urel.gcce4_4_1\]", "target.*epoc32.release.armv5.urel.test.exe.*\[arm.v5.urel.gcce4_4_1\]" ] t.run() # Rebuild using the --no-metadata-depend option having touched the MMP # No build should happen. t.name = "rebuild_with_using_no_metadata_depend" t.description = "Touch an MMP and run build again using --no-metadata-depend" t.command = ("touch smoke_suite/test_resources/simple/simple.mmp; " + "{0} -c arm.v5.urel.gcce4_4_1 --no-metadata-depend ".format(base_command)) t.targets = targets t.addbuildtargets("smoke_suite/test_resources/simple/bld.inf", buildtargets) t.mustmatch = [ "no warnings or errors", "built 'arm.v5.urel.gcce4_4_1'" ] # Don't clean the build targets as that would force a rebuild of everything. # The aim is to validate that nothing gets rebuilt despite the fact that the # MMP might have been re-written t.run(noclean=True) # Rebuild using the --no-metadata-depend option having touched the MMP # No build should happen. t.name = "rebuild_without_using_no_metadata_depend" t.description = "Touch an MMP and run build again without using --no-metadata-depend" t.command = ("touch smoke_suite/test_resources/simple/simple.mmp; " + "{0} -c arm.v5.urel.gcce4_4_1".format(base_command)) t.targets = targets t.addbuildtargets("smoke_suite/test_resources/simple/bld.inf", buildtargets) t.mustmatch = [ "compile.*smoke_suite.test_resources.simple.test.cpp.*\[arm.v5.urel.gcce4_4_1\]", "compile.*smoke_suite.test_resources.simple.test.cia.*\[arm.v5.urel.gcce4_4_1\]", "compile.*smoke_suite.test_resources.simple.test1.c\+\+.*\[arm.v5.urel.gcce4_4_1\]", "compile.*smoke_suite.test_resources.simple.test2.cxx.*\[arm.v5.urel.gcce4_4_1\]", "compile.*smoke_suite.test_resources.simple.test3.Cpp.*\[arm.v5.urel.gcce4_4_1\]", "compile.*smoke_suite.test_resources.simple.test4.cc.*\[arm.v5.urel.gcce4_4_1\]", "compile.*smoke_suite.test_resources.simple.test5.CC.*\[arm.v5.urel.gcce4_4_1\]", "compile.*smoke_suite.test_resources.simple.test6.C\+\+.*\[arm.v5.urel.gcce4_4_1\]", "target.*epoc32.release.armv5.urel.test.exe.*\[arm.v5.urel.gcce4_4_1\]" ] # Don't clean the build targets as that would force a rebuild of everything. # The aim is to validate the dependency of the .exe on its mmp file, so # a "touch" on the MMP, forces a rebuild t.run(noclean=True) return t