本文整理汇总了Python中raptor_tests.SmokeTest.mustmatch_multiline方法的典型用法代码示例。如果您正苦于以下问题:Python SmokeTest.mustmatch_multiline方法的具体用法?Python SmokeTest.mustmatch_multiline怎么用?Python SmokeTest.mustmatch_multiline使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类raptor_tests.SmokeTest
的用法示例。
在下文中一共展示了SmokeTest.mustmatch_multiline方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: run
# 需要导入模块: from raptor_tests import SmokeTest [as 别名]
# 或者: from raptor_tests.SmokeTest import mustmatch_multiline [as 别名]
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
示例2: run
# 需要导入模块: from raptor_tests import SmokeTest [as 别名]
# 或者: from raptor_tests.SmokeTest import mustmatch_multiline [as 别名]
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
示例3: run
# 需要导入模块: from raptor_tests import SmokeTest [as 别名]
# 或者: from raptor_tests.SmokeTest import mustmatch_multiline [as 别名]
def run():
t = SmokeTest()
t.id = "43563"
t.name = "annofile2log"
t.description = "test workaround for log corruption from a make engine whose name begins with 'e'"
t.usebash = True
t.errors = 0
t.returncode = 0
t.exceptions = 0
t.command = 'cd smoke_suite/test_resources/annofile2log && ( FROMANNO="`mktemp`" ; bzip2 -dc scrubbed_ncp_dfs_resource.anno.bz2 | python testanno2log.py >"${FROMANNO}" && FROMSTDOUT="`mktemp`"; bzip2 -dc scrubbed_ncp_dfs_resource.stdout.bz2 > "${FROMSTDOUT}" && diff -wB "${FROMANNO}" "${FROMSTDOUT}"; RET=$? ; rm "${FROMANNO}" "${FROMSTDOUT}"; exit $RET )'
t.mustmatch_multiline = [
"^ *.?"
]
t.run()
t.print_result()
return t
示例4: run
# 需要导入模块: from raptor_tests import SmokeTest [as 别名]
# 或者: from raptor_tests.SmokeTest import mustmatch_multiline [as 别名]
def run():
t = SmokeTest()
t.description = """talon_test: two 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
"""
# 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 = bindir + "/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 os.environ.has_key("SBS_CYGWIN"):
bash = ReplaceEnvs("$(SBS_CYGWIN)/bin/bash.exe")
# 3 Bash from an env. var.
if os.environ.has_key("SBS_SHELL"):
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"]=str(t.id)
os.environ["TALON_RECIPEATTRIBUTES"]="component=talontest"
# First part of test - command line
t.name = "talon_test command line"
t.id = "100a"
t.command = "%s -c %s" % (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()
if t.result == SmokeTest.FAIL:
result = SmokeTest.FAIL
# Second part of test - script file
t.name = "talon_test script file"
t.id = "100b"
t.command = "%s %s" % (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()
if t.result == SmokeTest.FAIL:
result = SmokeTest.FAIL
# Print final result
t.name = "talon_test"
t.id = "100"
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
示例5: run
# 需要导入模块: from raptor_tests import SmokeTest [as 别名]
# 或者: from raptor_tests.SmokeTest import mustmatch_multiline [as 别名]
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 %s -m ${SBSMAKEFILE} -f ${SBSLOGFILE} what && " + \
"EPOCROOT='%s' sbs_filter --filters FilterWhatComp < ${SBSLOGFILE} &&" % relative_epocroot + \
"EPOCROOT='%s' sbs_filter --filters FilterWhatComp < ${SBSLOGFILE}" % 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.id = "0106a"
t.name = "whatcomp_basic"
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()
t.id = "0106b"
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.id = "0106"
t.name = "whatcomp"
t.print_result()
return t
示例6: run
# 需要导入模块: from raptor_tests import SmokeTest [as 别名]
# 或者: from raptor_tests.SmokeTest import mustmatch_multiline [as 别名]
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:;<=>\[email protected]\[\\\]\^_`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