本文整理汇总了Python中build_options.OPTIONS.run_tests方法的典型用法代码示例。如果您正苦于以下问题:Python OPTIONS.run_tests方法的具体用法?Python OPTIONS.run_tests怎么用?Python OPTIONS.run_tests使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类build_options.OPTIONS
的用法示例。
在下文中一共展示了OPTIONS.run_tests方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _generate_independent_ninjas
# 需要导入模块: from build_options import OPTIONS [as 别名]
# 或者: from build_options.OPTIONS import run_tests [as 别名]
def _generate_independent_ninjas():
timer = build_common.SimpleTimer()
# Invoke an unordered set of ninja-generators distributed across config
# modules by name, and if that generator is marked for it.
timer.start('Generating independent generate_ninjas', True)
task_list = list(config_loader.find_name('generate_ninjas'))
if OPTIONS.run_tests():
task_list.extend(config_loader.find_name('generate_test_ninjas'))
ninja_list = ninja_generator_runner.run_in_parallel(task_list,
OPTIONS.configure_jobs())
timer.done()
return ninja_list
示例2: _generate_shared_lib_depending_ninjas
# 需要导入模块: from build_options import OPTIONS [as 别名]
# 或者: from build_options.OPTIONS import run_tests [as 别名]
def _generate_shared_lib_depending_ninjas(ninja_list):
timer = build_common.SimpleTimer()
timer.start('Generating plugin and packaging ninjas', OPTIONS.verbose())
# We must generate plugin/nexe ninjas after make->ninja lazy generation
# so that we have the full list of shared libraries to pass to
# the load test.
# These modules depend on shared libraries generated in the previous phase.
installed_shared_libs = (
ninja_generator.NinjaGenerator.get_installed_shared_libs(ninja_list[:]))
ninja_generators = list(
config_loader.find_name('generate_shared_lib_depending_ninjas'))
task_list = [(f, installed_shared_libs) for f in ninja_generators]
if OPTIONS.run_tests():
test_ninja_generators = list(
config_loader.find_name('generate_shared_lib_depending_test_ninjas'))
task_list.extend([(f, installed_shared_libs)
for f in test_ninja_generators])
result = ninja_generator_runner.run_in_parallel(task_list,
OPTIONS.configure_jobs())
timer.done()
return result