本文整理汇总了Python中lldbsuite.test_event.event_builder.EventBuilder.bare_event方法的典型用法代码示例。如果您正苦于以下问题:Python EventBuilder.bare_event方法的具体用法?Python EventBuilder.bare_event怎么用?Python EventBuilder.bare_event使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lldbsuite.test_event.event_builder.EventBuilder
的用法示例。
在下文中一共展示了EventBuilder.bare_event方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setupTestResults
# 需要导入模块: from lldbsuite.test_event.event_builder import EventBuilder [as 别名]
# 或者: from lldbsuite.test_event.event_builder.EventBuilder import bare_event [as 别名]
def setupTestResults():
"""Sets up test results-related objects based on arg settings."""
# Setup the results formatter configuration.
formatter_config = formatter.FormatterConfig()
formatter_config.filename = configuration.results_filename
formatter_config.formatter_name = configuration.results_formatter_name
formatter_config.formatter_options = (
configuration.results_formatter_options)
formatter_config.port = configuration.results_port
# Create the results formatter.
formatter_spec = formatter.create_results_formatter(
formatter_config)
if formatter_spec is not None and formatter_spec.formatter is not None:
configuration.results_formatter_object = formatter_spec.formatter
# Send an initialize message to the formatter.
initialize_event = EventBuilder.bare_event("initialize")
if isMultiprocessTestRunner():
if (configuration.test_runner_name is not None and
configuration.test_runner_name == "serial"):
# Only one worker queue here.
worker_count = 1
else:
# Workers will be the number of threads specified.
worker_count = configuration.num_threads
else:
worker_count = 1
initialize_event["worker_count"] = worker_count
formatter_spec.formatter.handle_event(initialize_event)
# Make sure we clean up the formatter on shutdown.
if formatter_spec.cleanup_func is not None:
atexit.register(formatter_spec.cleanup_func)