當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。