当前位置: 首页>>代码示例>>Python>>正文


Python SmokeTest.logfile方法代码示例

本文整理汇总了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
开发者ID:RomanSaveljev,项目名称:raptor,代码行数:41,代码来源:xml_invalid_chars.py


注:本文中的raptor_tests.SmokeTest.logfile方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。