本文整理汇总了Python中raptor_tests.SmokeTest.mustmatch方法的典型用法代码示例。如果您正苦于以下问题:Python SmokeTest.mustmatch方法的具体用法?Python SmokeTest.mustmatch怎么用?Python SmokeTest.mustmatch使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类raptor_tests.SmokeTest
的用法示例。
在下文中一共展示了SmokeTest.mustmatch方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: run
# 需要导入模块: from raptor_tests import SmokeTest [as 别名]
# 或者: from raptor_tests.SmokeTest import mustmatch [as 别名]
def run():
t = SmokeTest()
t.usebash = True
t.name = "var_test"
t.command = "sbs -b smoke_suite/test_resources/variable_test/bld.inf -c armv7 -f ${SBSLOGFILE} -m ${SBSMAKEFILE} && cat ${SBSLOGFILE}"
t.targets = []
t.mustmatch = ["<debug>SBS=.*/bin/sbs\.bat</debug>"]
t.run("windows")
t.mustmatch = ["<debug>SBS=.*/bin/sbs</debug>"]
t.run("linux")
return t
示例2: run
# 需要导入模块: from raptor_tests import SmokeTest [as 别名]
# 或者: from raptor_tests.SmokeTest import mustmatch [as 别名]
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
示例3: run
# 需要导入模块: from raptor_tests import SmokeTest [as 别名]
# 或者: from raptor_tests.SmokeTest import mustmatch [as 别名]
def run():
t = SmokeTest()
t.id = "71a"
t.name = "implib_implicit_def"
t.command = "sbs -b smoke_suite/test_resources/simple_implib/nodef/group/bld.inf" \
+ " -p implib_implicit_def.mmp"
t.targets = [
"$(EPOCROOT)/epoc32/release/armv5/lib/implib_implicit_def.dso",
"$(EPOCROOT)/epoc32/release/armv5/lib/implib_implicit_def{000a0000}.dso",
"$(EPOCROOT)/epoc32/release/winscw/udeb/implib_implicit_def.lib"
]
t.run()
t.id = "71b"
t.name = "implib_no_def"
t.command = "sbs -b smoke_suite/test_resources/simple_implib/nodef/group/bld.inf" \
+ " -p implib_no_def.mmp"
t.targets = []
t.mustmatch = [
"No DEF File for IMPLIB target type in"
]
t.errors = 2 # 1 for winscw and 1 for armv5
t.returncode = 1
t.run()
t.id = "71"
t.name = "implib_nodef"
t.print_result()
return t
示例4: run
# 需要导入模块: from raptor_tests import SmokeTest [as 别名]
# 或者: from raptor_tests.SmokeTest import mustmatch [as 别名]
def run():
t = SmokeTest()
t.id = "0096"
t.name = "kdll_armv5"
t.usebash = 1
t.command = "sbs -b smoke_suite/test_resources/simple_kdll/bld.inf -c armv5_urel -f-"
t.targets = [
"$(EPOCROOT)/epoc32/release/armv5/urel/test_kdll.dll",
"$(EPOCROOT)/epoc32/release/armv5/urel/test_kdll.dll.map",
"$(EPOCROOT)/epoc32/release/armv5/urel/test_kdll.dll.sym"
]
t.mustmatch = [
r".*\bksrt\d_\d\.lib\b.*",
r".*\bekll\.lib\b.*"
]
t.mustnotmatch = [
r".*usrt.*",
r".*scppnwdl.*"
]
t.run()
return t
示例5: run
# 需要导入模块: from raptor_tests import SmokeTest [as 别名]
# 或者: from raptor_tests.SmokeTest import mustmatch [as 别名]
def run():
t = SmokeTest()
t.id = "33"
t.name = "exe_winscw"
t.usebash = True
t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf -c winscw -m ${SBSMAKEFILE} -f ${SBSLOGFILE}; grep -E \"mwldsym2\" ${SBSLOGFILE}"
t.targets = [
"$(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_/winscw/udeb/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_.o",
"test_/winscw/urel/test_UID_.o",
"test_/winscw/urel/test.UID.CPP"
])
# Check that the default operator new library is used
t.mustmatch = [
'.*mwldsym2.*scppnwdl.lib.*test.exe.*'
]
t.run()
return t
示例6: run
# 需要导入模块: from raptor_tests import SmokeTest [as 别名]
# 或者: from raptor_tests.SmokeTest import mustmatch [as 别名]
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
示例7: run
# 需要导入模块: from raptor_tests import SmokeTest [as 别名]
# 或者: from raptor_tests.SmokeTest import mustmatch [as 别名]
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
示例8: run
# 需要导入模块: from raptor_tests import SmokeTest [as 别名]
# 或者: from raptor_tests.SmokeTest import mustmatch [as 别名]
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
示例9: run
# 需要导入模块: from raptor_tests import SmokeTest [as 别名]
# 或者: from raptor_tests.SmokeTest import mustmatch [as 别名]
def run():
t = SmokeTest()
t.description = "Set of tests for commandline option validation e.g. checking that the specified make engine exists"
t.usebash = True
t.errors = 1
t.returncode = 1
t.exceptions = 0
base_command = "sbs -b smoke_suite/test_resources/simple/bld.inf -f ${SBSLOGFILE} -m ${SBSMAKEFILE}"
t.id = "42562a"
t.name = "validate_makeengine_nonexist"
t.command = base_command + " -e amakeenginethatdoesnotexist"
t.mustmatch = ["Unable to use make engine: 'amakeenginethatdoesnotexist' does not appear to be a make engine - no settings found for it"]
t.run()
t.id = "43562b"
t.mustmatch = ["Unable to use make engine: 'arm' is not a build engine \(it's a variant but it does not extend 'make_engine'"]
t.name = "validate_makeengine_is_a_non_makengine_variant"
t.command = base_command + " -e arm"
t.run()
# aliases can be of the form name='blah' meaning='x.y.z' i.e. where the alias is for a sequence of variants
# this tests that we detect that at least one of these variants has make_engine as a parent
# it is possible for one of them not to and we mustn't bomb-out just because of that
t.id = "43562c"
t.mustmatch = []
t.name = "validate_real_dfs_modded_makeengine_alias"
t.command = "export HOME=$SBS_HOME/test/custom_options/dfsconfig; " + base_command + " -e dfstestmake -c arm.v5.urel.gcce4_4_1"
t.errors = 0
t.warnings = 0
t.returncode = 0
t.run()
t.id = "43562"
t.name = "input_validation"
t.print_result()
return t
示例10: run
# 需要导入模块: from raptor_tests import SmokeTest [as 别名]
# 或者: from raptor_tests.SmokeTest import mustmatch [as 别名]
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
示例11: run
# 需要导入模块: from raptor_tests import SmokeTest [as 别名]
# 或者: from raptor_tests.SmokeTest import mustmatch [as 别名]
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
示例12: run
# 需要导入模块: from raptor_tests import SmokeTest [as 别名]
# 或者: from raptor_tests.SmokeTest import mustmatch [as 别名]
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
示例13: run
# 需要导入模块: from raptor_tests import SmokeTest [as 别名]
# 或者: from raptor_tests.SmokeTest import mustmatch [as 别名]
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
示例14: run
# 需要导入模块: from raptor_tests import SmokeTest [as 别名]
# 或者: from raptor_tests.SmokeTest import mustmatch [as 别名]
def run():
t = SmokeTest()
t.name = "exported_flm_extension"
t.command = "sbs -b smoke_suite/test_resources/simple_extension/flm_bld.inf -c armv5"
t.targets = [
"$(EPOCROOT)/epoc32/build/flm_test_1_2",
"$(EPOCROOT)/epoc32/tools/makefile_templates/tools/flm_export.xml",
"$(EPOCROOT)/epoc32/tools/makefile_templates/tools/flm_export.flm"
]
t.run()
t.name = "per_component_flm"
t.usebash = True
t.command = "sbs --configpath=test/smoke_suite/test_resources/docs" + \
" -b smoke_suite/test_resources/simple_dll/bld.inf" + \
" -b smoke_suite/test_resources/simple_lib/bld.inf" + \
" -b smoke_suite/test_resources/tools2/bld.inf" + \
" -c armv5.documentation -c tools2.documentation -f-"
t.targets = [
"$(EPOCROOT)/epoc32/docs/simple_dll.txt",
"$(EPOCROOT)/epoc32/docs/CreateStaticDLL.mmp",
"$(EPOCROOT)/epoc32/docs/simple_lib.txt",
"$(EPOCROOT)/epoc32/docs/simple.mmp",
"$(EPOCROOT)/epoc32/docs/tools2.txt",
"$(EPOCROOT)/epoc32/docs/tool_exe.mmp",
"$(EPOCROOT)/epoc32/docs/tool_lib1.mmp",
"$(EPOCROOT)/epoc32/docs/tool_lib2.mmp"
]
t.mustmatch = [
"simple_dll.txt uses " + ReplaceEnvs(t.targets[1]),
"simple_lib.txt uses " + ReplaceEnvs(t.targets[3]),
"tools2.txt uses " + ReplaceEnvs(t.targets[5]) + " " + \
ReplaceEnvs(t.targets[6]) + " " + \
ReplaceEnvs(t.targets[7])
]
t.run()
t.name = "flm_extension"
t.print_result()
return t
示例15: run
# 需要导入模块: from raptor_tests import SmokeTest [as 别名]
# 或者: from raptor_tests.SmokeTest import mustmatch [as 别名]
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