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


Python EventBuilder.bare_event方法代码示例

本文整理汇总了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)
开发者ID:karwa,项目名称:swift-lldb,代码行数:37,代码来源:dotest.py


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