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)
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)
def setupTestResults(): """Sets up test results-related objects based on arg settings.""" # Create the results formatter. formatter_spec = formatter.create_results_formatter( "lldbsuite.test_event.formatter.results_formatter.ResultsFormatter") 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") initialize_event["worker_count"] = 1 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)