本文整理汇总了Python中common.Common.host_path方法的典型用法代码示例。如果您正苦于以下问题:Python Common.host_path方法的具体用法?Python Common.host_path怎么用?Python Common.host_path使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类common.Common
的用法示例。
在下文中一共展示了Common.host_path方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: run_tests
# 需要导入模块: from common import Common [as 别名]
# 或者: from common.Common import host_path [as 别名]
def run_tests(self):
focus = None
for test_name in self.tests:
for test_id in self.tests[test_name]:
if 'focus' in self.tests[test_name][test_id]:
focus = test_name
Common.message(_('Focusing on test:')+' '+test_name)
break
tests_run = 0
tests_failed = 0
tests_skipped = 0
for test_name in self.tests:
if test_name == '*':
continue
if focus and test_name != focus:
continue
Common.message("\n---\n"+_('Running test:')+' '+test_name+"\n")
test = self.tests[test_name]
temp_path = tempfile.mkdtemp(prefix='test-')
tests_path = os.path.dirname(self.path)+"/tests"
config_path = None # tests_path+"/"+test_name+"/config"
input_path = tests_path+"/"+test_name
output_path = temp_path+"/"+test_name+"/output"
status_path = temp_path+"/"+test_name+"/status"
os.makedirs(output_path)
os.makedirs(status_path)
result = self.run(config_path, input_path, output_path, status_path, test=test_name)
tests_run += result['tests']['run']
tests_failed += result['tests']['failed']
tests_skipped += result['tests']['skipped']
Common.message("")
Common.message(_('Host system path to pipeline output is:')+' '+Common.host_path(os.path.dirname(output_path)))
Common.message("")
if focus:
Common.message(_('Test in focus:')+' '+test_name)
Common.message("TESTS RUN: "+str(tests_run))
Common.message("TESTS FAILED: "+str(tests_failed))