本文整理汇总了Python中src.build.build_options.OPTIONS.verbose方法的典型用法代码示例。如果您正苦于以下问题:Python OPTIONS.verbose方法的具体用法?Python OPTIONS.verbose怎么用?Python OPTIONS.verbose使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类src.build.build_options.OPTIONS
的用法示例。
在下文中一共展示了OPTIONS.verbose方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: generate_ninjas
# 需要导入模块: from src.build.build_options import OPTIONS [as 别名]
# 或者: from src.build.build_options.OPTIONS import verbose [as 别名]
def generate_ninjas():
needs_clobbering, cache_to_save = _set_up_generate_ninja()
ninja_list, independent_ninja_cache = _generate_independent_ninjas(
needs_clobbering)
cache_to_save.extend(independent_ninja_cache)
ninja_list.extend(
_generate_shared_lib_depending_ninjas(ninja_list))
ninja_list.extend(_generate_dependent_ninjas(ninja_list))
top_level_ninja = _generate_top_level_ninja(ninja_list)
ninja_list.append(top_level_ninja)
# Run verification before emitting to files.
_verify_ninja_generator_list(ninja_list)
# Emit each ninja script to a file.
timer = build_common.SimpleTimer()
timer.start('Emitting ninja scripts', OPTIONS.verbose())
for ninja in ninja_list:
ninja.emit()
top_level_ninja.emit_depfile()
top_level_ninja.cleanup_out_directories(ninja_list)
timer.done()
if OPTIONS.enable_config_cache():
for cache_object, cache_path in cache_to_save:
cache_object.save_to_file(cache_path)
示例2: _generate_shared_lib_depending_ninjas
# 需要导入模块: from src.build.build_options import OPTIONS [as 别名]
# 或者: from src.build.build_options.OPTIONS import verbose [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 production shared libraries to
# pass to the load test.
# These modules depend on shared libraries generated in the previous phase.
production_shared_libs = (
ninja_generator.NinjaGenerator.get_production_shared_libs(ninja_list[:]))
generator_list = list(_list_ninja_generators(
_config_loader, 'generate_shared_lib_depending_ninjas'))
if OPTIONS.run_tests():
generator_list.extend(_list_ninja_generators(
_config_loader, 'generate_shared_lib_depending_test_ninjas'))
result_list = ninja_generator_runner.run_in_parallel(
[ninja_generator_runner.GeneratorTask(
config_context,
(generator, production_shared_libs))
for config_context, generator in generator_list],
OPTIONS.configure_jobs())
ninja_list = []
for config_result in result_list:
ninja_list.extend(config_result.generated_ninjas)
ninja_list.sort(key=lambda ninja: ninja.get_module_name())
timer.done()
return ninja_list
示例3: _generate_dependent_ninjas
# 需要导入模块: from src.build.build_options import OPTIONS [as 别名]
# 或者: from src.build.build_options.OPTIONS import verbose [as 别名]
def _generate_dependent_ninjas(ninja_list):
"""Generate the stage of ninjas coming after all executables."""
timer = build_common.SimpleTimer()
timer.start('Generating dependent ninjas', OPTIONS.verbose())
root_dir_install_all_targets = []
for n in ninja_list:
root_dir_install_all_targets.extend(build_common.get_android_fs_path(p) for
p in n._root_dir_install_targets)
generator_list = _list_ninja_generators(_config_loader,
'generate_binaries_depending_ninjas')
result_list = ninja_generator_runner.run_in_parallel(
[ninja_generator_runner.GeneratorTask(
config_context,
(generator, root_dir_install_all_targets))
for config_context, generator in generator_list],
OPTIONS.configure_jobs())
dependent_ninjas = []
for config_result in result_list:
dependent_ninjas.extend(config_result.generated_ninjas)
notice_ninja = ninja_generator.NoticeNinjaGenerator('notices')
notice_ninja.build_notices(ninja_list + dependent_ninjas)
dependent_ninjas.append(notice_ninja)
all_test_lists_ninja = ninja_generator.NinjaGenerator('all_test_lists')
all_test_lists_ninja.build_all_test_lists(ninja_list)
dependent_ninjas.append(all_test_lists_ninja)
all_unittest_info_ninja = ninja_generator.NinjaGenerator('all_unittest_info')
all_unittest_info_ninja.build_all_unittest_info(ninja_list)
dependent_ninjas.append(all_unittest_info_ninja)
timer.done()
return dependent_ninjas