本文整理汇总了Python中raptor_tests.SmokeTest.returncode方法的典型用法代码示例。如果您正苦于以下问题:Python SmokeTest.returncode方法的具体用法?Python SmokeTest.returncode怎么用?Python SmokeTest.returncode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类raptor_tests.SmokeTest
的用法示例。
在下文中一共展示了SmokeTest.returncode方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: run
# 需要导入模块: from raptor_tests import SmokeTest [as 别名]
# 或者: from raptor_tests.SmokeTest import returncode [as 别名]
def run():
t = SmokeTest()
t.name = "annofile2log_copy_from_log"
t.description = "test workaround for log corruption from a make engine whose name begins with 'e'"
command = 'cd smoke_suite/test_resources/annofile2log && ( FROMANNO="`mktemp`" ; bzip2 -dc {test_file_basename}.anno.bz2 ' \
' | python testanno2log.py >"${{FROMANNO}}" && FROMSTDOUT="`mktemp`"; bzip2 -dc {test_file_basename}.stdout.bz2 > ' \
'"${{FROMSTDOUT}}" && diff -wB "${{FROMANNO}}" "${{FROMSTDOUT}}"; RET=$? ; rm "${{FROMANNO}}" "${{FROMSTDOUT}}"; exit $RET )'
t.usebash = True
t.errors = 0
t.returncode = 0
t.exceptions = 0
t.command = command.format(test_file_basename = "scrubbed_ncp_dfs_resource")
t.run()
t.name = "annofile2log_new_format_annofile"
t.description = "test new format of annofile"
t.usebash = True
t.errors = 0
t.returncode = 0
t.exceptions = 0
t.command = command.format(test_file_basename = "scrubbed_ncp_dfs_resource_new")
t.run()
t.print_result()
return t
示例2: run
# 需要导入模块: from raptor_tests import SmokeTest [as 别名]
# 或者: from raptor_tests.SmokeTest import returncode [as 别名]
def run():
t = SmokeTest()
command = "sbs -k -b smoke_suite/test_resources/simple/longcompiles.inf -c armv7_urel{variant} -c winscw_udeb{variant} -c arm.v5.urel.gcce4_4_1{variant}"
talon_warning = ".*Command line length '\d+' exceeds the shell limit on this system of '\d+'. If this recipe is a compile, try using the '.use_compilation_command_file' variant to reduce overall command line length."
targets = [
"$(EPOCROOT)/epoc32/release/armv7/urel/longcompiles.exe",
"$(EPOCROOT)/epoc32/release/winscw/udeb/longcompiles.exe",
"$(EPOCROOT)/epoc32/release/armv5/urel/longcompiles.exe",
]
t.name = "longcompile_no_command_file"
t.description = """
Confirm OS-specific behaviour on massive compilation command lines.
On Linux, all should be well, but on Windows the compile will fail
together with a talon warning with some potentially useful advice.
"""
t.command = command.format(variant="")
if t.onWindows:
t.targets = []
t.mustmatch_singleline = [talon_warning]
t.warnings = 24
t.errors = 1
t.returncode = 1
else:
t.targets = targets
t.mustnotmatch_singleline = [talon_warning]
t.run()
t.name = "longcompile_command_file"
t.description = """
Confirm that a command file is used with the .use_compilation_command_file
variant, and that the build succeeds on all host OS platforms.
"""
t.command = command.format(variant=".use_compilation_command_file")
t.targets = targets
t.addbuildtargets(
"smoke_suite/test_resources/simple/longcompiles.inf",
[
"longcompiles_exe/armv7/urel/cc.cmdfile",
"longcompiles_exe/winscw/udeb/cc.cmdfile",
"longcompiles_exe/armv5/urel/cc.cmdfile",
],
)
t.mustmatch_singleline = []
t.mustnotmatch_singleline = []
t.warnings = 0
t.errors = 0
t.returncode = 0
t.run()
t.name = "longcompiles"
t.print_result()
return t
示例3: run
# 需要导入模块: from raptor_tests import SmokeTest [as 别名]
# 或者: from raptor_tests.SmokeTest import returncode [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 returncode [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
示例5: run
# 需要导入模块: from raptor_tests import SmokeTest [as 别名]
# 或者: from raptor_tests.SmokeTest import returncode [as 别名]
def run():
t = SmokeTest()
t.id = "50"
t.name = "sysdef_dud"
t.description = "Test an invalid system_definition.xml file"
t.command = "sbs -s " + "smoke_suite/test_resources/sysdef/system_definition_dud.xml"
t.targets = []
t.errors = 1
t.returncode = 1
t.run()
return t
示例6: run
# 需要导入模块: from raptor_tests import SmokeTest [as 别名]
# 或者: from raptor_tests.SmokeTest import returncode [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
示例7: run
# 需要导入模块: from raptor_tests import SmokeTest [as 别名]
# 或者: from raptor_tests.SmokeTest import returncode [as 别名]
def run():
t = SmokeTest()
t.name = "missing_keywords"
t.command = "sbs -b smoke_suite/test_resources/invalid_metadata/bld.inf -c armv5"
t.mustmatch_singleline = [
"sbs: error: required keyword TARGET is missing"
]
t.errors = 1
t.returncode = 1
t.run()
return t
示例8: run
# 需要导入模块: from raptor_tests import SmokeTest [as 别名]
# 或者: from raptor_tests.SmokeTest import returncode [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
示例9: run
# 需要导入模块: from raptor_tests import SmokeTest [as 别名]
# 或者: from raptor_tests.SmokeTest import returncode [as 别名]
def run():
t = SmokeTest()
t.description = "test that long commands time out and get retried"
exitCode = "128"
t.id = "60a"
t.name = "timeout"
t.usebash = True
t.command = "sbs -b smoke_suite/test_resources/timeout/bld.inf -f -"
t.mustmatch_singleline = [
"status exit='failed' code='" + exitCode + "' attempt='1' reason='timeout'",
]
t.errors = -1
t.returncode = 1
t.run()
t.id = "60b"
t.name = "timeout with retries"
t.usebash = True
t.command = "sbs -b smoke_suite/test_resources/timeout/bld.inf -t 3 -f -"
t.mustmatch_singleline = [
"status exit='retry' code='" + exitCode + "' attempt='1' reason='timeout'",
"status exit='retry' code='" + exitCode + "' attempt='2' reason='timeout'",
"status exit='failed' code='" + exitCode + "' attempt='3' reason='timeout'",
]
t.errors = -1
t.returncode = 1
t.run()
t.id = "60"
t.name = "timeout"
t.print_result()
return t
示例10: run
# 需要导入模块: from raptor_tests import SmokeTest [as 别名]
# 或者: from raptor_tests.SmokeTest import returncode [as 别名]
def run():
t = SmokeTest()
t.name = "exe_checksource"
t.description = "Build a exe with a checksource filter"
t.usebash = True
bldinf = "smoke_suite/test_resources/checksource/helloworld/bld.inf"
cmd1 = "sbs -b {0} REALLYCLEAN -m ${{SBSMAKEFILE}} -f ${{SBSLOGFILE}}".format(bldinf)
cmd2 = "sbs -b {0} --filter=FilterCheckSource -m ${{SBSMAKEFILE}} -f ${{SBSLOGFILE}}".format(bldinf)
cmd3 = "grep -i '.*checksource errors found.*' ${SBSLOGFILE}"
t.command = cmd1 + " && " + cmd2 + " && " + cmd3
t.mustmatch_singleline = ["[1-9] checksource errors found"]
t.returncode = 1
t.run("windows")
return t
示例11: run
# 需要导入模块: from raptor_tests import SmokeTest [as 别名]
# 或者: from raptor_tests.SmokeTest import returncode [as 别名]
def run():
t = SmokeTest()
t.name = "badconfigs"
t.description = """Tests that Raptor does indicate errors but does not traceback when reading faulty config files"""
t.command = "sbs -b smoke_suite/test_resources/simple/bld.inf --configpath=test/smoke_suite/test_resources/badconfigs --export-only -n -m ${SBSMAKEFILE} -f ${SBSLOGFILE}"
t.mustmatch = [
"sbs: warning: Failed to read XML file: .*missing_model_close_tag.xml:14:3: mismatched tag.*",
"sbs: warning: Failed to read XML file: .*missing_build_close.xml:18:0: no element found.*",
"sbs: warning: Unknown element bset.*",
"sbs: warning: Failed to read XML file: .*testconfig.xml:17:2: mismatched tag.*",
"sbs: warning: Unknown element bset.*",
"sbs: warning: Failed to read XML file: .*uknowntag.xml:17:2: mismatched tag.*",
"sbs: warning: Failed to read XML file:.*notxml1.xml:1:5:.*"
]
t.warnings = 7
t.errors = 0
t.returncode=0
t.run()
return t
示例12: run
# 需要导入模块: from raptor_tests import SmokeTest [as 别名]
# 或者: from raptor_tests.SmokeTest import returncode [as 别名]
def run():
t = SmokeTest()
t.name = "make_engine_filenames"
t.description = "Can we pass the makefilename and stage name to emake options like --annofile etc?"
t.mustmatch = [ ".*Executing.*emake.*historyfile=.*default\.history.*",
".*Executing.*emake.*annofile=.*\.default\.anno.*"]
t.mustnotmatch = [".*Executing.*emake.*historyfile=.*#STAGE#\.history.*",
".*Executing.*emake.*annofile=#MAKEFILE#\.anno.*"]
t.usebash = True
t.errors = 1
t.returncode = 1
base_command = "sbs generate -b smoke_suite/test_resources/simple/bld.inf -f-"
t.command = base_command + " -e emake --mo=--emake-annofile=#MAKEFILE#.anno --mo=--emake-historyfile=$(EPOCROOT)/epoc32/build/#STAGE#.history -k NOTARGET"
t.run()
t.print_result()
return t
示例13: run
# 需要导入模块: from raptor_tests import SmokeTest [as 别名]
# 或者: from raptor_tests.SmokeTest import returncode [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
示例14: run
# 需要导入模块: from raptor_tests import SmokeTest [as 别名]
# 或者: from raptor_tests.SmokeTest import returncode [as 别名]
def run():
t = SmokeTest()
t.name = "sbs_with_nonexisting_bldinf"
t.description = "Test if sbs generates warning if invoked without bld.inf specified i.e. using default bld.inf which doesn't exist"
t.command = "mkdir ${EPOCROOT}/emptydir; rm ${EPOCROOT}/emptydir/*; cd ${EPOCROOT}/emptydir; sbs -f ${SBSLOGFILE} -m {SBSMAKEFILE}"
t.usebash = True
t.warnings = 1
t.run()
t.name = "sbs_with_nonexisting_bldinf_cli"
t.description = "Test if sbs generates an error if invoked with a bad -b option"
t.command = "sbs -b none.inf"
t.usebash = False
t.errors = 1
t.warnings = 0
t.returncode = 1
t.mustmatch = ["sbs: error: build info file does not exist \(component .*none.inf\)"]
t.run()
t.print_result()
return t
示例15: run
# 需要导入模块: from raptor_tests import SmokeTest [as 别名]
# 或者: from raptor_tests.SmokeTest import returncode [as 别名]
def run():
t = SmokeTest()
t.id = "32"
t.name = "pre_export"
t.command = "sbs -b smoke_suite/test_resources/pre-export/bld.inf -c " + \
"armv5 -k"
t.targets = [
"$(EPOCROOT)/epoc32/include/my.mmh",
"$(EPOCROOT)/epoc32/include/second.mmh",
"$(EPOCROOT)/epoc32/release/armv5/udeb/petest.exe",
"$(EPOCROOT)/epoc32/release/armv5/udeb/petest.exe.map",
"$(EPOCROOT)/epoc32/release/armv5/urel/petest.exe",
"$(EPOCROOT)/epoc32/release/armv5/urel/petest.exe.map"
]
t.addbuildtargets('smoke_suite/test_resources/pre-export/bld.inf', [
"petest_/armv5/udeb/test.o",
"petest_/armv5/urel/test.o"
])
# we expect these errors because there are 2 MMP files deliberately missing
t.errors = 4
t.returncode = 1
t.run()
return t