本文整理汇总了Python中raptor_tests.SmokeTest.logfile方法的典型用法代码示例。如果您正苦于以下问题:Python SmokeTest.logfile方法的具体用法?Python SmokeTest.logfile怎么用?Python SmokeTest.logfile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类raptor_tests.SmokeTest
的用法示例。
在下文中一共展示了SmokeTest.logfile方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: run
# 需要导入模块: from raptor_tests import SmokeTest [as 别名]
# 或者: from raptor_tests.SmokeTest import logfile [as 别名]
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