def run(): t = SmokeTest() t.name = "filter_html_unit" tests = unittest.makeSuite(TestFilterHtml) result = unittest.TextTestRunner(verbosity=2).run(tests) if result.wasSuccessful(): t.result = SmokeTest.PASS else: t.result = SmokeTest.FAIL return t
def run(): t = SmokeTest() t.name = "raptor_api_unit" tests = unittest.makeSuite(TestRaptorApi) result = unittest.TextTestRunner(verbosity=2).run(tests) if result.wasSuccessful(): t.result = SmokeTest.PASS else: t.result = SmokeTest.FAIL return t
def run(): t = SmokeTest() t.id = "999" t.name = "generic_path_unit" tests = unittest.makeSuite(TestGenericPaths) result = unittest.TextTestRunner(verbosity=2).run(tests) if result.wasSuccessful(): t.result = SmokeTest.PASS else: t.result = SmokeTest.FAIL return t
def run(): t = SmokeTest() t.id = "999" t.name = "mmpparser_unit" tests = unittest.makeSuite(TestMMPParser) result = unittest.TextTestRunner(verbosity=2).run(tests) if result.wasSuccessful(): t.result = SmokeTest.PASS else: t.result = SmokeTest.FAIL return t
def run(): t = SmokeTest() # Should have returncode of 1 and output 1 error, but not cause a traceback t.returncode = 1 t.errors = 1 t.mustmatch = ["sbs: error: Non-ASCII character in argument or command file"] result = SmokeTest.PASS t.name = "non_ascii_argument" t.usebash = True # The dash in "-c" is an en dash, not a normal ASCII dash. t.command = r'set -x;sbs -b smoke_suite/test_resources/simple_dll/bld.inf `echo -e "\x96"`c armv5' t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL t.name = "non_ascii_commandfile" t.command = "sbs --command=smoke_suite/test_resources/non_ascii/cmd.txt" t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL t.name = "non_ascii" t.result = result t.print_result() return t
def run(): t = SmokeTest() # Should have returncode of 1 and output 1 error, but not cause a traceback t.returncode = 1 t.errors = 1 t.mustmatch = [ "sbs: error: Non-ASCII character in argument or command file" ] result = SmokeTest.PASS t.name = "non_ascii_argument" t.usebash = True # The dash in "-c" is an en dash, not a normal ASCII dash. t.command = r'set -x;sbs -b smoke_suite/test_resources/simple_dll/bld.inf `echo -e "\x96"`c armv5' t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL t.name = "non_ascii_commandfile" t.command = "sbs --command=smoke_suite/test_resources/non_ascii/cmd.txt" t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL t.name = "non_ascii" t.result = result t.print_result() return t
def run(): t = SmokeTest() t.id = "84" 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: print "Testing validity of XML..." log = "$(EPOCROOT)/epoc32/build/smoketestlogs/xml_invalid_chars.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.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.usebash = True result = SmokeTest.PASS description = """This test is testing 2 states of keywords, DEBUGGABLE on its own and with DEBUGGABLE_UDEBONLY together; in their mmp's make a new mmp change the target so that it generates another exe, and search together with that exe name when testing second test""" command = "sbs -b smoke_suite/test_resources/simple/bld.inf -b smoke_suite/test_resources/simple/debuggable_bld.inf -c {0} -m ${{SBSMAKEFILE}} -f ${{SBSLOGFILE}} && " \ "grep -i '.*elf2e32.*--debuggable.*' ${{SBSLOGFILE}};" 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", "$(EPOCROOT)/epoc32/release/armv5/udeb/debuggable.exe", "$(EPOCROOT)/epoc32/release/armv5/urel/debuggable.exe", "$(EPOCROOT)/epoc32/release/armv5/udeb/test.exe.sym", "$(EPOCROOT)/epoc32/release/armv5/udeb/debuggable.exe.sym", "$(EPOCROOT)/epoc32/release/armv5/udeb/debuggable.exe.map", "$(EPOCROOT)/epoc32/release/armv5/urel/test.exe.sym", "$(EPOCROOT)/epoc32/release/armv5/urel/debuggable.exe.sym", "$(EPOCROOT)/epoc32/release/armv5/urel/debuggable.exe.map" ] buildtargets = [ "test_/armv5/udeb/test.o", "test_/armv5/urel/test.o", "test_/armv5/udeb/test.o.d", "test_/armv5/udeb/test3.o.d", "test_/armv5/udeb/test4.o.d", "test_/armv5/udeb/test5.o.d", "test_/armv5/udeb/test1.o.d", "test_/armv5/udeb/test6.o.d", "test_/armv5/udeb/test2.o.d", "test_/armv5/udeb/test3.o", "test_/armv5/udeb/test4.o", "test_/armv5/udeb/test5.o", "test_/armv5/udeb/test1.o", "test_/armv5/udeb/test6.o", "test_/armv5/udeb/test2.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/udeb/test_udeb_objects.via", "test_/armv5/urel/test_urel_objects.via" ] mustmatch = [ ".*elf2e32.*urel.*test.exe.*--debuggable.*", ".*elf2e32.*udeb.*test.exe.*--debuggable.*", ".*elf2e32.*udeb.*debuggable.exe.*--debuggable.*" ] mustnotmatch = [ ".*elf2e32.*urel.*debuggable.exe.*--debuggable.*" ] warnings = 1 t.name = "exe_armv5_rvct" t.description = description t.command = command.format("armv5") t.targets = targets t.addbuildtargets("smoke_suite/test_resources/simple/bld.inf", buildtargets) t.mustmatch = mustmatch t.mustnotmatch = mustnotmatch t.warnings = warnings t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL t.name = "exe_armv5_clean" t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf -c armv5 clean" t.targets = [] t.mustmatch = [] t.mustnotmatch = [] t.warnings = 0 t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL t.name = "exe_armv5_gcce" t.command = command.format("gcce_armv5") t.targets = targets t.addbuildtargets("smoke_suite/test_resources/simple/bld.inf", buildtargets) t.mustmatch = mustmatch t.mustnotmatch = mustnotmatch t.warnings = warnings t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL # Test for the Check Filter to ensure that it reports # missing files properly when used from sbs_filter.py: import os abs_epocroot = os.path.abspath(os.environ["EPOCROOT"]) t.command = "rm $(EPOCROOT)/epoc32/release/armv5/udeb/test.exe.map; sbs_filter --filters=FilterCheck < ${SBSLOGFILE}" t.targets = [] t.mustmatch = ["MISSING:[ ]+" + abs_epocroot.replace("\\","\\\\") + ".epoc32.release.armv5.udeb.test\.exe\.map.*"] t.mustnotmatch = [] t.warnings = 1 t.returncode = 2 t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL t.name = "exe_armv5" t.result = result t.print_result() return t
def run(): t = SmokeTest() t.id = "0092a" t.name = "toolcheck" t.description = """Test toolcheck works properly, with 3 options: on, off and forced. TOOL1 3 4 and 5 are expected to fail and 2 to pass""" result = SmokeTest.PASS toolcheckDir = os.environ["SBS_HOME"].replace("\\","/") + "/test/smoke_suite/test_resources/toolcheck" # toolcheck ON t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf -n --configpath=" + toolcheckDir + \ " -c default.toolcheck --toolcheck=on" t.mustmatch = [ ".*tool 'TOOLCHECK1' from config 'none' did not return version.*", ".*tool 'TOOLCHECK3' from config 'none' did not return version.*", ".*tool 'TOOLCHECK4' from config 'none' did not return version.*", ".*tool 'TOOLCHECK5' from config 'none' did not return version.*" ] t.mustnotmatch = [ ".*TOOLCHECK2.*", ".*TOOLCHECK6.*" ] t.errors = 4 t.returncode = 1 t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL # toolcheck OFF t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf -n --configpath=" + toolcheckDir + \ " -c default.toolcheck --toolcheck=off" t.id = "0092b" t.mustmatch = [] t.mustnotmatch = [ ".*TOOLCHECK1.*", ".*TOOLCHECK3.*", ".*TOOLCHECK4.*", ".*TOOLCHECK5.*", ".*TOOLCHECK6.*" ] t.errors = 0 t.returncode = 0 t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL # force toolcheck t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf -n --configpath=" + toolcheckDir + \ " -c default.toolcheck --toolcheck=forced" t.id = "0092c" t.mustmatch = [ ".*tool 'TOOLCHECK1' from config 'none' did not return version.*", ".*tool 'TOOLCHECK3' from config 'none' did not return version.*", ".*tool 'TOOLCHECK4' from config 'none' did not return version.*", ".*tool 'TOOLCHECK5' from config 'none' did not return version.*" ] t.mustnotmatch = [ ".*TOOLCHECK2.*", ".*TOOLCHECK6.*" ] t.errors = 4 t.returncode = 1 t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL t.id = "0092" t.result = result t.print_result() return t
def run(): t = SmokeTest() t.usebash = True result = SmokeTest.PASS description = """This test is testing 2 states of keywords, DEBUGGABLE on its own and with DEBUGGABLE_UDEBONLY together; in their mmp's make a new mmp change the target so that it generates another exe, and search together with that exe name when testing second test""" command = "sbs -b smoke_suite/test_resources/simple/bld.inf -b smoke_suite/test_resources/simple/debuggable_bld.inf -c %s -m ${SBSMAKEFILE} -f ${SBSLOGFILE} && " + \ "grep -i '.*elf2e32.*--debuggable.*' ${SBSLOGFILE};" 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", "$(EPOCROOT)/epoc32/release/armv5/udeb/debuggable.exe", "$(EPOCROOT)/epoc32/release/armv5/urel/debuggable.exe", "$(EPOCROOT)/epoc32/release/armv5/udeb/test.exe.sym", "$(EPOCROOT)/epoc32/release/armv5/udeb/debuggable.exe.sym", "$(EPOCROOT)/epoc32/release/armv5/udeb/debuggable.exe.map", "$(EPOCROOT)/epoc32/release/armv5/urel/test.exe.sym", "$(EPOCROOT)/epoc32/release/armv5/urel/debuggable.exe.sym", "$(EPOCROOT)/epoc32/release/armv5/urel/debuggable.exe.map" ] buildtargets = [ "test_/armv5/udeb/test.o", "test_/armv5/urel/test.o", "test_/armv5/udeb/test.o.d", "test_/armv5/udeb/test3.o.d", "test_/armv5/udeb/test4.o.d", "test_/armv5/udeb/test5.o.d", "test_/armv5/udeb/test1.o.d", "test_/armv5/udeb/test6.o.d", "test_/armv5/udeb/test2.o.d", "test_/armv5/udeb/test3.o", "test_/armv5/udeb/test4.o", "test_/armv5/udeb/test5.o", "test_/armv5/udeb/test1.o", "test_/armv5/udeb/test6.o", "test_/armv5/udeb/test2.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/udeb/test_udeb_objects.via", "test_/armv5/urel/test_urel_objects.via" ] mustmatch = [ ".*elf2e32.*urel.*test.exe.*--debuggable.*", ".*elf2e32.*udeb.*test.exe.*--debuggable.*", ".*elf2e32.*udeb.*debuggable.exe.*--debuggable.*" ] mustnotmatch = [ ".*elf2e32.*urel.*debuggable.exe.*--debuggable.*" ] warnings = 1 t.id = "0001a" t.name = "exe_armv5_rvct" t.description = description t.command = command % "armv5" t.targets = targets t.addbuildtargets("smoke_suite/test_resources/simple/bld.inf", buildtargets) t.mustmatch = mustmatch t.mustnotmatch = mustnotmatch t.warnings = warnings t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL t.id = "0001b" t.name = "exe_armv5_clean" t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf -c armv5 clean" t.targets = [] t.mustmatch = [] t.mustnotmatch = [] t.warnings = 0 t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL t.id = "0001c" t.name = "exe_armv5_gcce" t.command = command % "gcce_armv5" t.targets = targets t.addbuildtargets("smoke_suite/test_resources/simple/bld.inf", buildtargets) t.mustmatch = mustmatch t.mustnotmatch = mustnotmatch t.warnings = warnings t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL # Test for the Check Filter to ensure that it reports # missing files properly when used from sbs_filter.py: import os abs_epocroot = os.path.abspath(os.environ["EPOCROOT"]) t.id = "0001d" t.command = "rm $(EPOCROOT)/epoc32/release/armv5/udeb/test.exe.map; sbs_filter --filters=FilterCheck < ${SBSLOGFILE}" t.targets = [] t.mustmatch = ["MISSING:[ ]+" + abs_epocroot.replace("\\","\\\\") + ".epoc32.release.armv5.udeb.test\.exe\.map.*"] t.mustnotmatch = [] t.warnings = 1 t.returncode = 2 t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL t.id = "1" t.name = "exe_armv5" t.result = result t.print_result() return t
def run(): result = SmokeTest.PASS t = SmokeTest() # Override logfileoption and makefileoption to stop them adding '-f' and '-m' t.logfileOption = lambda : "" t.makefileOption = lambda : "" t.id = "0083a" t.name = "splitlog_filter" t.description = "Tests scanlog_filter output" t.usebash = True t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf -c armv5 " + \ "--filters=FilterSplitlog " + \ "-f $(EPOCROOT)/epoc32/build/splitlog.xml " + \ "&& cat $(EPOCROOT)/epoc32/build/splitlog.xml" 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 = [ ".*<info.*" ] t.mustnotmatch = [ ".*<clean.*", ".*</clean>.*", ".*<whatlog.*", ".*</whatlog>.*", ".*<recipe.*", ".*</recipe>.*" ] t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL t.id = "0083b" t.name = "splitlog_cleancheck" t.command = "cat $(EPOCROOT)/epoc32/build/splitlog.clean.xml" t.targets = [] t.mustmatch = [ ".*<clean.*", ".*</clean>.*" ] t.mustnotmatch = [ ".*<info.*" ".*<whatlog.*", ".*</whatlog>.*", ".*<recipe.*", ".*</recipe>.*" ] t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL t.id = "0083c" t.name = "splitlog_whatlogcheck" t.command = "cat $(EPOCROOT)/epoc32/build/splitlog.whatlog.xml" t.mustmatch = [ ".*<whatlog.*", ".*</whatlog>.*" ] t.mustnotmatch = [ ".*<info.*", ".*<clean.*", ".*</clean>.*", ".*<recipe.*", ".*</recipe>.*" ] t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL t.id = "0083d" t.name = "splitlog_recipecheck" t.command = "cat $(EPOCROOT)/epoc32/build/splitlog.recipe.xml" t.mustmatch = [ ".*<recipe.*", ".*</recipe>.*" ] t.mustnotmatch = [ ".*<info.*", ".*<clean.*", ".*</clean>.*", ".*<whatlog.*", ".*</whatlog>.*" ] t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL t.id = "83" t.name = "splitlog_filter" t.result = result t.print_result() return t
def run(): result = SmokeTest.PASS t = SmokeTest() t.id = "0057a" t.name = "gccxml" t.usebash = True t.command = "sbs -b smoke_suite/test_resources/simple_gui/bld.inf " + \ "-c gccxml_urel -m ${SBSMAKEFILE} -f ${SBSLOGFILE} && " + \ "grep -o 'gcc.*-fpermissive' ${SBSLOGFILE}" t.targets = [ "$(EPOCROOT)/epoc32/release/gccxml/includeheaders.txt", "$(EPOCROOT)/epoc32/release/gccxml/urel/helloworldexe.gxp" ] t.addbuildtargets('smoke_suite/test_resources/simple_gui/bld.inf', [ "helloworld_exe/gccxml/HelloWorld.mmp.xml", "helloworld_exe/helloworld_HelloWorld.rsc.d", "helloworld_exe/gccxml/HelloWorld.rss.rfi", "helloworld_reg_exe/helloworld_reg_HelloWorld_reg.rsc.d", "helloworld_exe/gccxml/HelloWorld_reg.rss.rfi", "helloworld_exe/gccxml/urel/HelloWorld_Application.xml.d", "helloworld_exe/gccxml/urel/HelloWorld_Application.xml", "helloworld_exe/gccxml/urel/HelloWorld_AppUi.xml.d", "helloworld_exe/gccxml/urel/HelloWorld_AppUi.xml", "helloworld_exe/gccxml/urel/HelloWorld_AppView.xml.d", "helloworld_exe/gccxml/urel/HelloWorld_AppView.xml", "helloworld_exe/gccxml/urel/HelloWorld_Document.xml.d", "helloworld_exe/gccxml/urel/HelloWorld_Document.xml", "helloworld_exe/gccxml/urel/HelloWorld_Main.xml.d", "helloworld_exe/gccxml/urel/HelloWorld_Main.xml" ]) t.mustmatch = [ ".*gcc.*-fpermissive.*" ] # Windows-only until formal delivery of a Linux version of gccxml_cc1plus t.run("windows") if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL elif t.result == SmokeTest.SKIP: return t t = AntiTargetSmokeTest() t.id = "0057b" t.name = "gccxml_reallyclean" t.command = "sbs -b smoke_suite/test_resources/simple_gui/bld.inf " + \ "-c gccxml_urel REALLYCLEAN" t.antitargets = ["$(EPOCROOT)/epoc32/release/gccxml/urel/helloworldexe.gxp"] t.addbuildantitargets('smoke_suite/test_resources/simple_gui/bld.inf', [ "helloworld_exe/gccxml/HelloWorld.mmp.xml", "helloworld_exe/helloworld_HelloWorld.rsc.d", "helloworld_exe/gccxml/HelloWorld.rss.rfi", "helloworld_reg_exe/helloworld_reg_HelloWorld_reg.rsc.d", "helloworld_exe/gccxml/HelloWorld_reg.rss.rfi", "helloworld_exe/gccxml/urel/HelloWorld_Application.xml.d", "helloworld_exe/gccxml/urel/HelloWorld_Application.xml", "helloworld_exe/gccxml/urel/HelloWorld_AppUi.xml.d", "helloworld_exe/gccxml/urel/HelloWorld_AppUi.xml", "helloworld_exe/gccxml/urel/HelloWorld_AppView.xml.d", "helloworld_exe/gccxml/urel/HelloWorld_AppView.xml", "helloworld_exe/gccxml/urel/HelloWorld_Document.xml.d", "helloworld_exe/gccxml/urel/HelloWorld_Document.xml", "helloworld_exe/gccxml/urel/HelloWorld_Main.xml.d", "helloworld_exe/gccxml/urel/HelloWorld_Main.xml" ]) t.run("windows") if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL t = SmokeTest() t.id = "0057c" t.name = "gccxml_var2" t.command = "sbs -b smoke_suite/test_resources/simple_gui/BldVar2.inf " + \ "-c gccxml_urel -f -" # Don't allow -m or -f to be appended t.logfileOption = lambda :"" t.makefileOption = lambda :"" t.mustmatch = [".*__KERNEL_MODE__.*"] t.errors = 1 # not really VAR2 code, so it wont build cleanly t.returncode = 1 t.run("windows") if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL t = SmokeTest() t.id = "0057d" t.name = "gccxml_stdcpp" t.command = "sbs -b smoke_suite/test_resources/simple_gui/Bld_stdcpp.inf " + \ "-c gccxml_urel -f -" # Don't allow -m or -f to be appended t.logfileOption = lambda :"" t.makefileOption = lambda :"" t.mustmatch = [".*__SYMBIAN_STDCPP_SUPPORT__.*"] t.errors = 0 # reset after previous run t.run("windows") if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL t.id = "57" t.name = "gccxml" t.result = result t.print_result() return t
def run(): # Generate source files for simple_lib tests dir = ReplaceEnvs("$(SBS_HOME)/test/smoke_suite/test_resources/simple_lib") zs = "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz" for i in range(1, 100): file = open(os.path.join(dir, zs + "_" + str(i) + ".cpp"), "w") file.write("int f(void) { return 1; }\n") file.close() # Convenience method to list generated source build output def __generatedFiles(aConfig): udeb = "etest_lib/{0}/udeb/".format(aConfig) urel = "etest_lib/{0}/urel/".format(aConfig) generated = [] for i in range(1, 100): generated.append(udeb + zs + "_" + str(i) + ".o") generated.append(udeb + zs + "_" + str(i) + ".o.d") generated.append(urel + zs + "_" + str(i) + ".o") generated.append(urel + zs + "_" + str(i) + ".o.d") return generated t = SmokeTest() result = SmokeTest.PASS armv5targets = [ "$(EPOCROOT)/epoc32/release/armv5/udeb/etest.lib", "$(EPOCROOT)/epoc32/release/armv5/urel/etest.lib" ] armv5buildtargets = [ "etest_lib/armv5/udeb/etest_udeb_objects.via", "etest_lib/armv5/udeb/test_lib.o", "etest_lib/armv5/urel/etest_urel_objects.via", "etest_lib/armv5/urel/test_lib.o" ] armv5buildtargets.extend(__generatedFiles("armv5")) t.name = "lib_armv5_rvct" t.command = "sbs -b smoke_suite/test_resources/simple_lib/bld.inf -c armv5 LIBRARY" t.targets = armv5targets t.addbuildtargets('smoke_suite/test_resources/simple_lib/bld.inf', armv5buildtargets) t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL t.name = "lib_armv5_clean" t.command = "sbs -b smoke_suite/test_resources/simple_lib/bld.inf -c armv5 clean" t.targets = [] t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL t.name = "lib_armv5_gcce" t.command = "sbs -b smoke_suite/test_resources/simple_lib/bld.inf -c gcce_armv5 LIBRARY" t.targets = armv5targets t.addbuildtargets('smoke_suite/test_resources/simple_lib/bld.inf', armv5buildtargets) t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL t.name = "lib_armv7" t.command = "sbs -b smoke_suite/test_resources/simple_lib/bld.inf -c armv7 LIBRARY" t.targets = [ "$(EPOCROOT)/epoc32/release/armv7/udeb/etest.lib", "$(EPOCROOT)/epoc32/release/armv7/urel/etest.lib" ] t.addbuildtargets('smoke_suite/test_resources/simple_lib/bld.inf', [ "etest_lib/armv7/udeb/etest_udeb_objects.via", "etest_lib/armv7/udeb/test_lib.o", "etest_lib/armv7/urel/etest_urel_objects.via", "etest_lib/armv7/urel/test_lib.o" ]) t.addbuildtargets('smoke_suite/test_resources/simple_lib/bld.inf', __generatedFiles("armv7")) t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL t.name = "lib_armv5_armv7" t.result = result t.print_result() return t
def run(): result = SmokeTest.PASS t = SmokeTest() t.id = "0018a" t.name = "temclean" t.command = "sbs -b smoke_suite/test_resources/tem/bldclean.inf -c armv5 CLEAN" t.targets = [ "$(EPOCROOT)/epoc32/raptor_smoketest_tem_succeeded", "$(EPOCROOT)/epoc32/raptor_smoketest_tem_failed" ] t.missing = 2 t.warnings = 1 t.returncode = 0 t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL t.id = "0018b" t.name = "temtest" t.command = "sbs -b smoke_suite/test_resources/tem/bld.inf -c armv5" t.targets = [ "$(EPOCROOT)/epoc32/raptor_smoketest_tem_succeeded" ] t.warnings = 2 t.missing = 0 t.returncode = 1 t.mustmatch = [ "repeated call to TEM with same values.* Stop\." ] t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL t.id = "0018c" t.name = "temclean2" t.command = "sbs -b smoke_suite/test_resources/tem/bldclean.inf -c armv5 CLEAN" t.targets = [ "$(EPOCROOT)/epoc32/raptor_smoketest_tem_succeeded", "$(EPOCROOT)/epoc32/raptor_smoketest_tem_failed" ] t.missing = 2 t.warnings = 1 t.returncode = 0 t.mustmatch = [] t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL t.id = "0018d" t.name = "badtem" t.command = "sbs -b smoke_suite/test_resources/tem/bad_bld.inf -c armv5" t.targets = [ "$(EPOCROOT)/epoc32/raptor_smoketest_tem_failed" ] t.warnings = 3 t.missing = 0 t.returncode = 1 t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL t.id = "0018e" t.name = "temclean3" t.command = "sbs -b smoke_suite/test_resources/tem/bldclean.inf -c armv5 CLEAN" t.targets = [ "$(EPOCROOT)/epoc32/raptor_smoketest_tem_succeeded", "$(EPOCROOT)/epoc32/raptor_smoketest_tem_failed" ] t.missing = 2 t.warnings = 1 t.returncode = 0 t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL t = CheckWhatSmokeTest() t.id = "0018f" t.name = "temwhat" t.command = "sbs -b smoke_suite/test_resources/simple_extension/bld.inf --what" t.output_expected_only_once = True t.stdout = [ # exports '$(EPOCROOT)/epoc32/tools/makefile_templates/sbsv2test/clean.mk', '$(EPOCROOT)/epoc32/tools/makefile_templates/sbsv2test/clean.meta', '$(EPOCROOT)/epoc32/tools/makefile_templates/sbsv2test/build.mk', '$(EPOCROOT)/epoc32/tools/makefile_templates/sbsv2test/build.meta', # release tree built '$(EPOCROOT)/epoc32/release/armv5/udeb/simple_extension.txt', '$(EPOCROOT)/epoc32/release/armv5/urel/simple_extension.txt', '$(EPOCROOT)/epoc32/release/winscw/udeb/simple_extension.txt', '$(EPOCROOT)/epoc32/release/winscw/urel/simple_extension.txt' ] t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL t = SmokeTest() t.id = "0018g" t.name = "badtem2" t.command = "sbs -b smoke_suite/test_resources/tem/bad2_bld.inf -c armv5" t.targets = [ "$(EPOCROOT)/epoc32/raptor_smoketest_tem_failed" ] t.warnings = 3 t.returncode = 1 t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL t.id = "18" t.name = "temtest" t.result = result 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(): result = SmokeTest.PASS t = SmokeTest() t.name = "exe_armv5_winscw_single_file_baseline_build" # Build component t.id = "0089a" 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.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.rpp", "helloworld_reg_exe/helloworld_reg_HelloWorld_reg.rsc.d" ]) t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL # 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.id = "0089b" 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() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL # Attempt separate source and resource file compile where nothing should be done t.id = "0089c" 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() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL t.id = "89" t.name = "exe_armv5_winscw_single_file" t.description = """Builds a component and tests single file compilation for straight source and resource files""" t.result = result t.print_result() return t
def run(): result = SmokeTest.PASS t = SmokeTest() t.id = "0005a" t.name = "exe_armv5_winscw" t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf -c armv5 " + \ "-c winscw" 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", "$(EPOCROOT)/epoc32/release/winscw/udeb/test.exe", "$(EPOCROOT)/epoc32/release/winscw/urel/test.exe", "$(EPOCROOT)/epoc32/release/winscw/urel/test.exe.map" ] t.addbuildtargets('smoke_suite/test_resources/simple/bld.inf', [ "test_/armv5/udeb/test.o", "test_/armv5/urel/test.o", "test_/winscw/udeb/test.o", "test_/winscw/udeb/test_UID_.o", "test_/winscw/udeb/test.UID.CPP", "test_/winscw/urel/test.o", "test_/winscw/urel/test_UID_.o", "test_/winscw/urel/test.UID.CPP" ]) t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL "Check that CLEAN removes built files" c = AntiTargetSmokeTest() c.id = "0005b" c.name = "exe_armv5_winscw_clean" c.command = "sbs -b smoke_suite/test_resources/simple/bld.inf -c armv5 " + \ "-c winscw CLEAN" c.antitargets = [ "$(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", "$(EPOCROOT)/epoc32/release/winscw/udeb/test.exe", "$(EPOCROOT)/epoc32/release/winscw/urel/test.exe", "$(EPOCROOT)/epoc32/release/winscw/urel/test.exe.map" ] c.addbuildantitargets('smoke_suite/test_resources/simple/bld.inf', [ "test_/armv5/udeb/test.o", "test_/armv5/urel/test.o", "test_/winscw/udeb/test.o", "test_/winscw/udeb/test_UID_.o", "test_/winscw/udeb/test.UID.CPP", "test_/winscw/urel/test.o", "test_/winscw/urel/test_UID_.o", "test_/winscw/urel/test.UID.CPP" ]) c.run() if c.result == SmokeTest.FAIL: result = SmokeTest.FAIL "Rebuild" t.id = "0005c" t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL "Check that REALLYCLEAN removes built files" c.id = "0005d" c.name = "exe_armv5_winscw_reallyclean" c.command = "sbs -b smoke_suite/test_resources/simple/bld.inf -c armv5 " + \ "-c winscw REALLYCLEAN" c.run() if c.result == SmokeTest.FAIL: result = SmokeTest.FAIL t.id = "5" t.name = "exe_armv5_winscw_plus_clean" t.result = result t.print_result() return t
def run(): result = SmokeTest.PASS t = SmokeTest() t.id = "0018a" t.name = "temclean" t.command = "sbs -b smoke_suite/test_resources/tem/bldclean.inf -c armv5 CLEAN" t.targets = [ "$(EPOCROOT)/epoc32/raptor_smoketest_tem_succeeded", "$(EPOCROOT)/epoc32/raptor_smoketest_tem_failed" ] t.missing = 2 t.warnings = 1 t.returncode = 0 t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL t.id = "0018b" t.name = "temtest" t.command = "sbs -b smoke_suite/test_resources/tem/bld.inf -c armv5" t.targets = ["$(EPOCROOT)/epoc32/raptor_smoketest_tem_succeeded"] t.warnings = 2 t.missing = 0 t.returncode = 1 t.mustmatch = ["repeated call to TEM with same values.* Stop\."] t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL t.id = "0018c" t.name = "temclean2" t.command = "sbs -b smoke_suite/test_resources/tem/bldclean.inf -c armv5 CLEAN" t.targets = [ "$(EPOCROOT)/epoc32/raptor_smoketest_tem_succeeded", "$(EPOCROOT)/epoc32/raptor_smoketest_tem_failed" ] t.missing = 2 t.warnings = 1 t.returncode = 0 t.mustmatch = [] t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL t.id = "0018d" t.name = "badtem" t.command = "sbs -b smoke_suite/test_resources/tem/bad_bld.inf -c armv5" t.targets = ["$(EPOCROOT)/epoc32/raptor_smoketest_tem_failed"] t.warnings = 3 t.missing = 0 t.returncode = 1 t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL t.id = "0018e" t.name = "temclean3" t.command = "sbs -b smoke_suite/test_resources/tem/bldclean.inf -c armv5 CLEAN" t.targets = [ "$(EPOCROOT)/epoc32/raptor_smoketest_tem_succeeded", "$(EPOCROOT)/epoc32/raptor_smoketest_tem_failed" ] t.missing = 2 t.warnings = 1 t.returncode = 0 t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL t = CheckWhatSmokeTest() t.id = "0018f" t.name = "temwhat" t.command = "sbs -b smoke_suite/test_resources/simple_extension/bld.inf --what" t.output_expected_only_once = True t.stdout = [ # exports '$(EPOCROOT)/epoc32/tools/makefile_templates/sbsv2test/clean.mk', '$(EPOCROOT)/epoc32/tools/makefile_templates/sbsv2test/clean.meta', '$(EPOCROOT)/epoc32/tools/makefile_templates/sbsv2test/build.mk', '$(EPOCROOT)/epoc32/tools/makefile_templates/sbsv2test/build.meta', # release tree built '$(EPOCROOT)/epoc32/release/armv5/udeb/simple_extension.txt', '$(EPOCROOT)/epoc32/release/armv5/urel/simple_extension.txt', '$(EPOCROOT)/epoc32/release/winscw/udeb/simple_extension.txt', '$(EPOCROOT)/epoc32/release/winscw/urel/simple_extension.txt' ] t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL t = SmokeTest() t.id = "0018g" t.name = "badtem2" t.command = "sbs -b smoke_suite/test_resources/tem/bad2_bld.inf -c armv5" t.targets = ["$(EPOCROOT)/epoc32/raptor_smoketest_tem_failed"] t.warnings = 3 t.returncode = 1 t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL t.id = "18" t.name = "temtest" t.result = result t.print_result() return t
def run(): result = SmokeTest.PASS t = SmokeTest() t.id = "0057a" t.name = "gccxml" t.usebash = True t.command = "sbs -b smoke_suite/test_resources/simple_gui/bld.inf " + \ "-c gccxml_urel -m ${SBSMAKEFILE} -f ${SBSLOGFILE} && " + \ "grep -o 'gcc.*-fpermissive' ${SBSLOGFILE}" t.targets = [ "$(EPOCROOT)/epoc32/release/gccxml/includeheaders.txt", "$(EPOCROOT)/epoc32/release/gccxml/urel/helloworldexe.gxp" ] t.addbuildtargets('smoke_suite/test_resources/simple_gui/bld.inf', [ "helloworld_exe/gccxml/HelloWorld.mmp.xml", "helloworld_exe/helloworld_HelloWorld.rsc.d", "helloworld_exe/gccxml/HelloWorld.rss.rfi", "helloworld_reg_exe/helloworld_reg_HelloWorld_reg.rsc.d", "helloworld_exe/gccxml/HelloWorld_reg.rss.rfi", "helloworld_exe/gccxml/urel/HelloWorld_Application.xml.d", "helloworld_exe/gccxml/urel/HelloWorld_Application.xml", "helloworld_exe/gccxml/urel/HelloWorld_AppUi.xml.d", "helloworld_exe/gccxml/urel/HelloWorld_AppUi.xml", "helloworld_exe/gccxml/urel/HelloWorld_AppView.xml.d", "helloworld_exe/gccxml/urel/HelloWorld_AppView.xml", "helloworld_exe/gccxml/urel/HelloWorld_Document.xml.d", "helloworld_exe/gccxml/urel/HelloWorld_Document.xml", "helloworld_exe/gccxml/urel/HelloWorld_Main.xml.d", "helloworld_exe/gccxml/urel/HelloWorld_Main.xml" ]) t.mustmatch = [".*gcc.*-fpermissive.*"] # Windows-only until formal delivery of a Linux version of gccxml_cc1plus t.run("windows") if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL elif t.result == SmokeTest.SKIP: return t t = AntiTargetSmokeTest() t.id = "0057b" t.name = "gccxml_reallyclean" t.command = "sbs -b smoke_suite/test_resources/simple_gui/bld.inf " + \ "-c gccxml_urel REALLYCLEAN" t.antitargets = [ "$(EPOCROOT)/epoc32/release/gccxml/urel/helloworldexe.gxp" ] t.addbuildantitargets('smoke_suite/test_resources/simple_gui/bld.inf', [ "helloworld_exe/gccxml/HelloWorld.mmp.xml", "helloworld_exe/helloworld_HelloWorld.rsc.d", "helloworld_exe/gccxml/HelloWorld.rss.rfi", "helloworld_reg_exe/helloworld_reg_HelloWorld_reg.rsc.d", "helloworld_exe/gccxml/HelloWorld_reg.rss.rfi", "helloworld_exe/gccxml/urel/HelloWorld_Application.xml.d", "helloworld_exe/gccxml/urel/HelloWorld_Application.xml", "helloworld_exe/gccxml/urel/HelloWorld_AppUi.xml.d", "helloworld_exe/gccxml/urel/HelloWorld_AppUi.xml", "helloworld_exe/gccxml/urel/HelloWorld_AppView.xml.d", "helloworld_exe/gccxml/urel/HelloWorld_AppView.xml", "helloworld_exe/gccxml/urel/HelloWorld_Document.xml.d", "helloworld_exe/gccxml/urel/HelloWorld_Document.xml", "helloworld_exe/gccxml/urel/HelloWorld_Main.xml.d", "helloworld_exe/gccxml/urel/HelloWorld_Main.xml" ]) t.run("windows") if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL t = SmokeTest() t.id = "0057c" t.name = "gccxml_var2" t.command = "sbs -b smoke_suite/test_resources/simple_gui/BldVar2.inf " + \ "-c gccxml_urel -f -" # Don't allow -m or -f to be appended t.logfileOption = lambda: "" t.makefileOption = lambda: "" t.mustmatch = [".*__KERNEL_MODE__.*"] t.errors = 1 # not really VAR2 code, so it wont build cleanly t.returncode = 1 t.run("windows") if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL t = SmokeTest() t.id = "0057d" t.name = "gccxml_stdcpp" t.command = "sbs -b smoke_suite/test_resources/simple_gui/Bld_stdcpp.inf " + \ "-c gccxml_urel -f -" # Don't allow -m or -f to be appended t.logfileOption = lambda: "" t.makefileOption = lambda: "" t.mustmatch = [".*__SYMBIAN_STDCPP_SUPPORT__.*"] t.errors = 0 # reset after previous run t.run("windows") if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL t.id = "57" t.name = "gccxml" t.result = result t.print_result() return t
def run(): # Generate source files for simple_lib tests dir = ReplaceEnvs("$(SBS_HOME)/test/smoke_suite/test_resources/simple_lib") zs = "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz" for i in range(1, 100): file = open(os.path.join(dir, zs + "_" + str(i) + ".cpp"), "w") file.write("int f(void) { return 1; }\n") file.close() # Convenience method to list generated source build output def __generatedFiles(aConfig): udeb = "etest_lib/%s/udeb/" % aConfig urel = "etest_lib/%s/urel/" % aConfig generated = [] for i in range(1, 100): generated.append(udeb + zs + "_" + str(i) + ".o") generated.append(udeb + zs + "_" + str(i) + ".o.d") generated.append(urel + zs + "_" + str(i) + ".o") generated.append(urel + zs + "_" + str(i) + ".o.d") return generated t = SmokeTest() result = SmokeTest.PASS armv5targets = [ "$(EPOCROOT)/epoc32/release/armv5/udeb/etest.lib", "$(EPOCROOT)/epoc32/release/armv5/urel/etest.lib" ] armv5buildtargets = [ "etest_lib/armv5/udeb/etest_udeb_objects.via", "etest_lib/armv5/udeb/test_lib.o", "etest_lib/armv5/urel/etest_urel_objects.via", "etest_lib/armv5/urel/test_lib.o" ] armv5buildtargets.extend(__generatedFiles("armv5")) t.id = "0013a" t.name = "lib_armv5_rvct" t.command = "sbs -b smoke_suite/test_resources/simple_lib/bld.inf -c armv5 LIBRARY" t.targets = armv5targets t.addbuildtargets('smoke_suite/test_resources/simple_lib/bld.inf', armv5buildtargets) t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL t.id = "0013b" t.name = "lib_armv5_clean" t.command = "sbs -b smoke_suite/test_resources/simple_lib/bld.inf -c armv5 clean" t.targets = [] t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL t.id = "0013c" t.name = "lib_armv5_gcce" t.command = "sbs -b smoke_suite/test_resources/simple_lib/bld.inf -c gcce_armv5 LIBRARY" t.targets = armv5targets t.addbuildtargets('smoke_suite/test_resources/simple_lib/bld.inf', armv5buildtargets) t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL t.name = "lib_armv7" t.id = "0013d" t.command = "sbs -b smoke_suite/test_resources/simple_lib/bld.inf -c armv7 LIBRARY" t.targets = [ "$(EPOCROOT)/epoc32/release/armv7/udeb/etest.lib", "$(EPOCROOT)/epoc32/release/armv7/urel/etest.lib" ] t.addbuildtargets('smoke_suite/test_resources/simple_lib/bld.inf', [ "etest_lib/armv7/udeb/etest_udeb_objects.via", "etest_lib/armv7/udeb/test_lib.o", "etest_lib/armv7/urel/etest_urel_objects.via", "etest_lib/armv7/urel/test_lib.o" ]) t.addbuildtargets('smoke_suite/test_resources/simple_lib/bld.inf', __generatedFiles("armv7")) t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL t.id = "13" t.name = "lib_armv5_armv7" t.result = result t.print_result() return t
def run(): result = SmokeTest.PASS # export the TEM t = SmokeTest() t.id = "73a" t.name = "tem_stages" t.command = "sbs -b smoke_suite/test_resources/tem_stages/bld.inf EXPORT" t.targets = [ "$(EPOCROOT)/epoc32/tools/makefile_templates/test/tem_stages.mk", "$(EPOCROOT)/epoc32/tools/makefile_templates/test/tem_stages.meta" ] t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL # run the main test t.id = "73b" t.name = "tem_stages" t.command = "sbs -b smoke_suite/test_resources/tem_stages/bld.inf" t.targets = [ "$(EPOCROOT)/epoc32/build/generated/tem_stages_generated.cpp", "$(EPOCROOT)/epoc32/include/tem_stages_generated.h", "$(EPOCROOT)/epoc32/include/tem_stages_generated_armv5_urel.rsg", "$(EPOCROOT)/epoc32/include/tem_stages_generated_armv5_udeb.rsg", "$(EPOCROOT)/epoc32/include/tem_stages_generated_winscw_urel.rsg", "$(EPOCROOT)/epoc32/include/tem_stages_generated_winscw_udeb.rsg", "$(EPOCROOT)/epoc32/include/tem_stages_generated_armv5_urel.lib", "$(EPOCROOT)/epoc32/include/tem_stages_generated_armv5_udeb.lib", "$(EPOCROOT)/epoc32/include/tem_stages_generated_winscw_urel.lib", "$(EPOCROOT)/epoc32/include/tem_stages_generated_winscw_udeb.lib", "$(EPOCROOT)/epoc32/include/tem_stages_generated_armv5_urel.bin", "$(EPOCROOT)/epoc32/include/tem_stages_generated_armv5_udeb.bin", "$(EPOCROOT)/epoc32/include/tem_stages_generated_winscw_urel.bin", "$(EPOCROOT)/epoc32/include/tem_stages_generated_winscw_udeb.bin", "$(EPOCROOT)/epoc32/include/tem_stages_generated_armv5_urel.final", "$(EPOCROOT)/epoc32/include/tem_stages_generated_armv5_udeb.final", "$(EPOCROOT)/epoc32/include/tem_stages_generated_winscw_urel.final", "$(EPOCROOT)/epoc32/include/tem_stages_generated_winscw_udeb.final", "$(EPOCROOT)/epoc32/release/armv5/urel/tem_stages.lib", "$(EPOCROOT)/epoc32/release/armv5/urel/tem_stages.exe", "$(EPOCROOT)/epoc32/release/armv5/udeb/tem_stages.lib", "$(EPOCROOT)/epoc32/release/armv5/udeb/tem_stages.exe", "$(EPOCROOT)/epoc32/release/armv5/urel/tem_stages.lib2", "$(EPOCROOT)/epoc32/release/armv5/urel/tem_stages.exe2", "$(EPOCROOT)/epoc32/release/armv5/udeb/tem_stages.lib2", "$(EPOCROOT)/epoc32/release/armv5/udeb/tem_stages.exe2", "$(EPOCROOT)/epoc32/release/winscw/urel/tem_stages.lib", "$(EPOCROOT)/epoc32/release/winscw/urel/tem_stages.exe", "$(EPOCROOT)/epoc32/release/winscw/udeb/tem_stages.lib", "$(EPOCROOT)/epoc32/release/winscw/udeb/tem_stages.exe", "$(EPOCROOT)/epoc32/release/winscw/urel/tem_stages.lib2", "$(EPOCROOT)/epoc32/release/winscw/urel/tem_stages.exe2", "$(EPOCROOT)/epoc32/release/winscw/udeb/tem_stages.lib2", "$(EPOCROOT)/epoc32/release/winscw/udeb/tem_stages.exe2", ] t.run() if t.result == SmokeTest.FAIL: result = SmokeTest.FAIL # return the combined result t.id = "73" t.name = "tem_stages" t.result = result 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