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(): 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.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 = "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=%s < 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 % "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 % "FilterComp[]" t.run() # with a parameter t.name = "sbs_filter_one_param" t.command = command % "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 % "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(): 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