1 # Copyright (C) 2010 Google Inc. All rights reserved.
2 # Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Szeged
3 # Copyright (C) 2011, 2016, 2019 Apple Inc. All rights reserved.
5 # Redistribution and use in source and binary forms, with or without
6 # modification, are permitted provided that the following conditions are
9 # * Redistributions of source code must retain the above copyright
10 # notice, this list of conditions and the following disclaimer.
11 # * Redistributions in binary form must reproduce the above
12 # copyright notice, this list of conditions and the following disclaimer
13 # in the documentation and/or other materials provided with the
15 # * Neither the name of Google Inc. nor the names of its
16 # contributors may be used to endorse or promote products derived from
17 # this software without specific prior written permission.
19 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
23 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 from __future__ import print_function
38 from webkitpy.common.host import Host
39 from webkitpy.common.interrupt_debugging import log_stack_trace_on_ctrl_c, log_stack_trace_on_term
40 from webkitpy.layout_tests.controllers.manager import Manager
41 from webkitpy.layout_tests.models.test_run_results import INTERRUPTED_EXIT_STATUS
42 from webkitpy.port import configuration_options, platform_options
43 from webkitpy.layout_tests.views import buildbot_results
44 from webkitpy.layout_tests.views import printing
45 from webkitpy.results.options import upload_options
48 _log = logging.getLogger(__name__)
51 # This is a randomly chosen exit code that can be tested against to
52 # indicate that an unexpected exception occurred.
53 EXCEPTIONAL_EXIT_STATUS = 254
56 def main(argv, stdout, stderr):
57 options, args = parse_args(argv)
59 if options.platform and 'test' in options.platform:
60 # It's a bit lame to import mocks into real code, but this allows the user
61 # to run tests against the test platform interactively, which is useful for
62 # debugging test failures.
63 from webkitpy.common.host_mock import MockHost
68 if options.lint_test_files:
69 from webkitpy.layout_tests.lint_test_expectations import lint
70 return lint(host, options, stderr)
73 port = host.port_factory.get(options.platform, options)
74 except NotImplementedError as e:
75 # FIXME: is this the best way to handle unsupported port names?
76 print(str(e), file=stderr)
77 return EXCEPTIONAL_EXIT_STATUS
79 stack_trace_path = host.filesystem.join(port.results_directory(), 'python_stack_trace.txt')
80 log_stack_trace_on_ctrl_c(output_file=stack_trace_path)
81 log_stack_trace_on_term(output_file=stack_trace_path)
83 if options.print_expectations:
84 return _print_expectations(port, options, args, stderr)
87 # Force all tests to use a smaller stack so that stack overflow tests can run faster.
88 stackSizeInBytes = int(1.5 * 1024 * 1024)
89 options.additional_env_var.append('JSC_maxPerThreadStackUsage=' + str(stackSizeInBytes))
90 options.additional_env_var.append('__XPC_JSC_maxPerThreadStackUsage=' + str(stackSizeInBytes))
91 options.additional_env_var.append('JSC_useSharedArrayBuffer=1')
92 options.additional_env_var.append('__XPC_JSC_useSharedArrayBuffer=1')
93 run_details = run(port, options, args, stderr)
94 if run_details.exit_code != -1 and run_details.skipped_all_tests:
95 return run_details.exit_code
96 if run_details.exit_code != -1 and not run_details.initial_results.keyboard_interrupted:
97 bot_printer = buildbot_results.BuildBotPrinter(stdout, options.debug_rwt_logging)
98 bot_printer.print_results(run_details)
100 return run_details.exit_code
101 # We still need to handle KeyboardInterrupt, at least for webkitpy unittest cases.
102 except KeyboardInterrupt:
103 return INTERRUPTED_EXIT_STATUS
104 except BaseException as e:
105 if isinstance(e, Exception):
106 print('\n%s raised: %s' % (e.__class__.__name__, str(e)), file=stderr)
107 traceback.print_exc(file=stderr)
108 return EXCEPTIONAL_EXIT_STATUS
111 def parse_args(args):
112 option_group_definitions = []
114 option_group_definitions.append(("Platform options", platform_options()))
115 option_group_definitions.append(("Configuration options", configuration_options()))
116 option_group_definitions.append(("Printing Options", printing.print_options()))
118 option_group_definitions.append(("Feature Switches", [
119 optparse.make_option("--complex-text", action="store_true", default=False,
120 help="Use the complex text code path for all text (OS X and Windows only)"),
121 optparse.make_option("--accelerated-drawing", action="store_true", default=False,
122 help="Use accelerated drawing (OS X only)"),
123 optparse.make_option("--remote-layer-tree", action="store_true", default=False,
124 help="Use the remote layer tree drawing model (OS X WebKit2 only)"),
125 optparse.make_option("--internal-feature", type="string", action="append", default=[],
126 help="Enable (disable) an internal feature (--internal-feature FeatureName[=true|false])"),
127 optparse.make_option("--experimental-feature", type="string", action="append", default=[],
128 help="Enable (disable) an experimental feature (--experimental-feature FeatureName[=true|false])"),
131 option_group_definitions.append(("WebKit Options", [
132 optparse.make_option("--gc-between-tests", action="store_true", default=False,
133 help="Force garbage collection between each test"),
134 optparse.make_option("-l", "--leaks", action="store_true", default=False,
135 help="Enable leaks checking (OS X and Gtk+ only)"),
136 optparse.make_option("-g", "--guard-malloc", action="store_true", default=False,
137 help="Enable Guard Malloc (OS X only)"),
138 optparse.make_option("--threaded", action="store_true", default=False,
139 help="Run a concurrent JavaScript thread with each test"),
140 optparse.make_option("--dump-render-tree", "-1", action="store_false", default=True, dest="webkit_test_runner",
141 help="Use DumpRenderTree rather than WebKitTestRunner."),
142 # FIXME: We should merge this w/ --build-directory and only have one flag.
143 optparse.make_option("--root", action="store",
144 help="Path to a directory containing the executables needed to run tests."),
147 option_group_definitions.append(("Results Options", [
148 optparse.make_option("-p", "--pixel", "--pixel-tests", action="store_true",
149 dest="pixel_tests", help="Enable pixel-to-pixel PNG comparisons"),
150 optparse.make_option("--no-pixel", "--no-pixel-tests", action="store_false",
151 dest="pixel_tests", help="Disable pixel-to-pixel PNG comparisons"),
152 optparse.make_option("--no-sample-on-timeout", action="store_false", default=True,
153 dest="sample_on_timeout", help="Don't run sample on timeout (OS X only)"),
154 optparse.make_option("--no-ref-tests", action="store_true",
155 dest="no_ref_tests", help="Skip all ref tests"),
156 optparse.make_option("--ignore-render-tree-dump-results", action="store_true",
157 dest="ignore_render_tree_dump_results",
158 help="Don't compare or save results for render tree dump tests (they still run and crashes are reported)"),
159 optparse.make_option("--tolerance",
160 help="Ignore image differences less than this percentage (some "
161 "ports may ignore this option)", type="float"),
162 optparse.make_option("--results-directory", help="Location of test results"),
163 optparse.make_option("--build-directory",
164 help="Path to the directory under which build files are kept (should not include configuration)"),
165 optparse.make_option("--add-platform-exceptions", action="store_true", default=False,
166 help="Save generated results into the *most-specific-platform* directory rather than the *generic-platform* directory"),
167 optparse.make_option("--new-baseline", action="store_true",
168 default=False, help="Save generated results as new baselines "
169 "into the *most-specific-platform* directory, overwriting whatever's "
170 "already there. Equivalent to --reset-results --add-platform-exceptions"),
171 optparse.make_option("--reset-results", action="store_true",
172 default=False, help="Reset expectations to the "
173 "generated results in their existing location."),
174 optparse.make_option("--no-new-test-results", action="store_false",
175 dest="new_test_results", default=True,
176 help="Don't create new baselines when no expected results exist"),
177 optparse.make_option("--treat-ref-tests-as-pixel-tests", action="store_true", default=False,
178 help="Run ref tests, but treat them as if they were traditional pixel tests"),
180 #FIXME: we should support a comma separated list with --pixel-test-directory as well.
181 optparse.make_option("--pixel-test-directory", action="append", default=[], dest="pixel_test_directories",
182 help="A directory where it is allowed to execute tests as pixel tests. "
183 "Specify multiple times to add multiple directories. "
184 "This option implies --pixel-tests. If specified, only those tests "
185 "will be executed as pixel tests that are located in one of the "
186 "directories enumerated with the option. Some ports may ignore this "
187 "option while others can have a default value that can be overridden here."),
189 optparse.make_option("--skip-failing-tests", action="store_true",
190 default=False, help="Skip tests that are marked as failing or flaky. "
191 "Note: When using this option, you might miss new crashes "
193 optparse.make_option("--additional-drt-flag", action="append",
194 default=[], help="Additional command line flag to pass to DumpRenderTree "
195 "Specify multiple times to add multiple flags."),
196 optparse.make_option("--driver-name", type="string",
197 help="Alternative DumpRenderTree binary to use"),
198 optparse.make_option("--additional-platform-directory", action="append",
199 default=[], help="Additional directory where to look for test "
200 "baselines (will take precendence over platform baselines). "
201 "Specify multiple times to add multiple search path entries."),
202 optparse.make_option("--additional-expectations", action="append", default=[],
203 help="Path to a test_expectations file that will override previous expectations. "
204 "Specify multiple times for multiple sets of overrides."),
205 optparse.make_option("--compare-port", action="store", default=None,
206 help="Use the specified port's baselines first"),
207 optparse.make_option("--no-show-results", action="store_false",
208 default=True, dest="show_results",
209 help="Don't launch a browser with results after the tests "
211 optparse.make_option("--full-results-html", action="store_true",
213 help="Show all failures in results.html, rather than only regressions"),
214 optparse.make_option("--clobber-old-results", action="store_true",
215 default=False, help="Clobbers test results from previous runs."),
216 optparse.make_option("--http", action="store_true", dest="http",
217 default=True, help="Run HTTP and WebSocket tests (default)"),
218 optparse.make_option("--no-http", action="store_false", dest="http",
219 help="Don't run HTTP and WebSocket tests"),
220 optparse.make_option("--no-http-servers", action="store_false", dest="start_http_servers_if_needed",
221 default=True, help="Don't start HTTP servers"),
222 optparse.make_option("--ignore-metrics", action="store_true", dest="ignore_metrics",
223 default=False, help="Ignore rendering metrics related information from test "
224 "output, only compare the structure of the rendertree."),
225 optparse.make_option("--nocheck-sys-deps", action="store_true",
227 help="Don't check the system dependencies (themes)"),
228 optparse.make_option("--java", action="store_true",
230 help="Build java support files"),
231 optparse.make_option("--layout-tests-directory", action="store", default=None,
232 help="Override the default layout test directory.", dest="layout_tests_dir")
235 option_group_definitions.append(("Testing Options", [
236 optparse.make_option("--build", dest="build",
237 action="store_true", default=True,
238 help="Check to ensure the DumpRenderTree build is up-to-date "
240 optparse.make_option("--no-build", dest="build",
241 action="store_false", help="Don't check to see if the "
242 "DumpRenderTree build is up-to-date."),
243 optparse.make_option("-n", "--dry-run", action="store_true",
245 help="Do everything but actually run the tests or upload results."),
246 optparse.make_option("--wrapper",
247 help="wrapper command to insert before invocations of "
248 "DumpRenderTree or WebKitTestRunner; option is split on whitespace before "
249 "running. (Example: --wrapper='valgrind --smc-check=all')"),
250 optparse.make_option("-i", "--ignore-tests", action="append", default=[],
251 help="directories or test to ignore (may specify multiple times)"),
252 optparse.make_option("--test-list", action="append",
253 help="read list of tests to run from file", metavar="FILE"),
254 optparse.make_option("--skipped", action="store", default="default",
255 help=("control how tests marked SKIP are run. "
256 "'default' == Skip tests unless explicitly listed on the command line, "
257 "'ignore' == Run them anyway, "
258 "'only' == only run the SKIP tests, "
259 "'always' == always skip, even if listed on the command line.")),
260 optparse.make_option("--force", action="store_true", default=False,
261 help="Run all tests with PASS as expected result, even those marked SKIP in the test list or " + \
262 "those which are device-specific (implies --skipped=ignore)"),
263 optparse.make_option("--time-out-ms", "--timeout",
264 help="Set the timeout for each test in milliseconds"),
265 optparse.make_option("--order", action="store", default="natural",
266 help=("determine the order in which the test cases will be run. "
267 "'none' == use the order in which the tests were listed either in arguments or test list, "
268 "'natural' == use the natural order (default), "
269 "'random' == randomize the test order.")),
270 optparse.make_option("--run-chunk",
271 help=("Run a specified chunk (n:l), the nth of len l, "
272 "of the layout tests")),
273 optparse.make_option("--run-part", help=("Run a specified part (n:m), "
274 "the nth of m parts, of the layout tests")),
275 optparse.make_option("--batch-size",
276 help=("Run a the tests in batches (n), after every n tests, "
277 "DumpRenderTree is relaunched."), type="int", default=None),
278 optparse.make_option("--run-singly", action="store_true",
279 default=False, help="run a separate DumpRenderTree for each test (implies --verbose)"),
280 optparse.make_option("--child-processes",
281 help="Number of DumpRenderTrees to run in parallel."),
282 # FIXME: Display default number of child processes that will run.
283 optparse.make_option("-f", "--fully-parallel", action="store_true",
284 help="run all tests in parallel"),
285 optparse.make_option("--exit-after-n-failures", type="int", default=None,
286 help="Exit after the first N failures instead of running all "
288 optparse.make_option("--exit-after-n-crashes-or-timeouts", type="int",
289 default=None, help="Exit after the first N crashes instead of "
290 "running all tests"),
291 optparse.make_option("--iterations", type="int", default=1, help="Number of times to run the set of tests (e.g. ABCABCABC)"),
292 optparse.make_option("--repeat-each", type="int", default=1, help="Number of times to run each test (e.g. AAABBBCCC)"),
293 optparse.make_option("--retry-failures", action="store_true",
295 help="Re-try any tests that produce unexpected results (default)"),
296 optparse.make_option("--no-retry-failures", action="store_false",
297 dest="retry_failures",
298 help="Don't re-try any tests that produce unexpected results."),
299 optparse.make_option("--max-locked-shards", type="int", default=0,
300 help="Set the maximum number of locked shards"),
301 optparse.make_option("--additional-env-var", type="string", action="append", default=[],
302 help="Passes that environment variable to the tests (--additional-env-var=NAME=VALUE)"),
303 optparse.make_option("--profile", action="store_true",
304 help="Output per-test profile information."),
305 optparse.make_option("--profiler", action="store",
306 help="Output per-test profile information, using the specified profiler."),
307 optparse.make_option("--no-timeout", action="store_true", default=False, help="Disable test timeouts"),
308 optparse.make_option('--display-server', choices=['xvfb', 'xorg', 'weston', 'wayland'], default='xvfb',
309 help='"xvfb": Use a virtualized X11 server. "xorg": Use the current X11 session. '
310 '"weston": Use a virtualized Weston server. "wayland": Use the current wayland session.'),
311 optparse.make_option("--world-leaks", action="store_true", default=False, help="Check for world leaks (currently, only documents). Differs from --leaks in that this uses internal instrumentation, rather than external tools."),
312 optparse.make_option("--accessibility-isolated-tree", action="store_true", default=False, help="Runs tests in accessibility isolated tree mode."),
315 option_group_definitions.append(("iOS Options", [
316 optparse.make_option('--no-install', action='store_const', const=False, default=True, dest='install',
317 help='Skip install step for device and simulator testing'),
318 optparse.make_option('--version', help='Specify the version of iOS to be used. By default, this will adopt the runtime for iOS Simulator.'),
319 optparse.make_option('--device-type', help='iOS Simulator device type identifier (default: i386 -> iPhone 5, x86_64 -> iPhone SE)'),
320 optparse.make_option('--dedicated-simulators', action="store_true", default=False,
321 help="If set, dedicated iOS simulators will always be created. If not set, the script will attempt to use any currently running simulator."),
322 optparse.make_option('--show-touches', action="store_true", default=False, help="If set, a small dot will be shown where the generated touches are. Helpful for debugging touch tests."),
325 option_group_definitions.append(("Miscellaneous Options", [
326 optparse.make_option(
327 "--lint-test-files", action="store_true", default=False,
328 help=("Makes sure the test files parse for all configurations. Does not run any tests.")),
329 optparse.make_option(
330 "--print-expectations", action="store_true", default=False,
331 help=("Print the expected outcome for the given test, or all tests listed in TestExpectations. Does not run any tests.")),
332 optparse.make_option(
333 "--webgl-test-suite", action="store_true", default=False,
334 help=("Run exhaustive webgl list, including test ordinarily skipped for performance reasons. Equivalent to '--additional-expectations=LayoutTests/webgl/TestExpectations webgl'")),
335 optparse.make_option(
336 "--use-gpu-process", action="store_true", default=False,
337 help=("Enable all GPU process related features, also set additional expectations and the result report flavor.")),
338 optparse.make_option(
339 "--prefer-integrated-gpu", action="store_true", default=False,
340 help=("Prefer using the lower-power integrated GPU on a dual-GPU system. Note that other running applications and the tests themselves can override this request.")),
343 option_group_definitions.append(("Web Platform Test Server Options", [
344 optparse.make_option("--wptserver-doc-root", type="string", help=("Set web platform server document root, relative to LayoutTests directory")),
347 # FIXME: Remove this group once the old results dashboards are deprecated.
348 option_group_definitions.append(("Legacy Result Options", [
349 optparse.make_option("--master-name", help="The name of the buildbot master."),
350 optparse.make_option("--build-name", default="DUMMY_BUILD_NAME",
351 help=("The name of the builder used in its path, e.g. webkit-rel.")),
352 optparse.make_option("--build-slave", default="DUMMY_BUILD_SLAVE",
353 help=("The name of the worker used. e.g. apple-macpro-6.")),
354 optparse.make_option("--test-results-server", action="append", default=[],
355 help=("If specified, upload results json files to this appengine server.")),
356 optparse.make_option("--results-server-host", action="append", default=[],
357 help=("If specified, upload results JSON file to this results server.")),
358 optparse.make_option("--additional-repository-name",
359 help=("The name of an additional subversion or git checkout")),
360 optparse.make_option("--additional-repository-path",
361 help=("The path to an additional subversion or git checkout (requires --additional-repository-name)")),
362 optparse.make_option("--allowed-host", type="string", action="append", default=[],
363 help=("If specified, tests are allowed to make requests to the specified hostname."))
366 option_group_definitions.append(('Upload Options', upload_options()))
368 option_parser = optparse.OptionParser(usage="%prog [options] [<path>...]")
370 for group_name, group_options in option_group_definitions:
371 option_group = optparse.OptionGroup(option_parser, group_name)
372 option_group.add_options(group_options)
373 option_parser.add_option_group(option_group)
375 options, args = option_parser.parse_args(args)
376 if options.webgl_test_suite:
380 host.initialize_scm()
381 options.additional_expectations.insert(0, host.filesystem.join(host.scm().checkout_root, 'LayoutTests/webgl/TestExpectations'))
383 if options.use_gpu_process:
385 host.initialize_scm()
386 options.additional_expectations.insert(0, host.filesystem.join(host.scm().checkout_root, 'LayoutTests/gpu-process/TestExpectations'))
387 if not options.internal_feature:
388 options.internal_feature = []
389 options.internal_feature.append('UseGPUProcessForMediaEnabled')
390 options.internal_feature.append('CaptureAudioInGPUProcessEnabled')
391 options.internal_feature.append('CaptureVideoInGPUProcessEnabled')
392 options.internal_feature.append('UseGPUProcessForCanvasRenderingEnabled')
393 options.internal_feature.append('UseGPUProcessForDOMRenderingEnabled')
394 options.internal_feature.append('UseGPUProcessForWebGLEnabled')
395 if not options.experimental_feature:
396 options.experimental_feature = []
397 options.experimental_feature.append('WebRTCPlatformCodecsInGPUProcessEnabled')
398 if options.result_report_flavor:
399 raise RuntimeError('--use-gpu-process implicitly sets the result flavor, this should not be overridden')
400 options.result_report_flavor = 'gpuprocess'
405 def _print_expectations(port, options, args, logging_stream):
406 logger = logging.getLogger()
407 logger.setLevel(logging.DEBUG if options.debug_rwt_logging else logging.INFO)
409 printer = printing.Printer(port, options, logging_stream, logger=logger)
411 _set_up_derived_options(port, options)
412 manager = Manager(port, options, printer)
414 exit_code = manager.print_expectations(args)
415 _log.debug("Printing expectations completed, Exit status: %d", exit_code)
417 except Exception as error:
418 _log.error('Error printing expectations: {}'.format(error))
424 def _set_up_derived_options(port, options):
425 """Sets the options values that depend on other options values."""
426 if not options.child_processes:
427 options.child_processes = os.environ.get('WEBKIT_TEST_CHILD_PROCESSES')
429 if not options.configuration:
430 options.configuration = port.default_configuration()
432 if options.pixel_tests is None:
433 options.pixel_tests = port.default_pixel_tests()
435 if not options.time_out_ms:
436 options.time_out_ms = str(port.default_timeout_ms())
438 options.slow_time_out_ms = str(5 * int(options.time_out_ms))
440 if options.additional_platform_directory:
441 additional_platform_directories = []
442 for path in options.additional_platform_directory:
443 additional_platform_directories.append(port.host.filesystem.abspath(path))
444 options.additional_platform_directory = additional_platform_directories
447 if options.skipped not in ('ignore', 'default'):
448 _log.warning("--force overrides --skipped=%s" % (options.skipped))
449 options.skipped = 'ignore'
451 if not options.http and options.skipped in ('ignore', 'only'):
452 _log.warning("--force/--skipped=%s overrides --no-http." % (options.skipped))
455 if options.ignore_metrics and (options.new_baseline or options.reset_results):
456 _log.warning("--ignore-metrics has no effect with --new-baselines or with --reset-results")
458 if options.new_baseline:
459 options.reset_results = True
460 options.add_platform_exceptions = True
462 if options.pixel_test_directories:
463 options.pixel_tests = True
464 varified_dirs = set()
465 pixel_test_directories = options.pixel_test_directories
466 for directory in pixel_test_directories:
467 # FIXME: we should support specifying the directories all the ways we support it for additional
468 # arguments specifying which tests and directories to run. We should also move the logic for that
470 filesystem = port.host.filesystem
471 if not filesystem.isdir(filesystem.join(port.layout_tests_dir(), directory)):
472 _log.warning("'%s' was passed to --pixel-test-directories, which doesn't seem to be a directory" % str(directory))
474 varified_dirs.add(directory)
476 options.pixel_test_directories = list(varified_dirs)
478 if options.run_singly:
479 options.verbose = True
481 # The GTK+ and WPE ports only support WebKit2 so they always use WKTR.
482 if options.platform in ["gtk", "wpe"]:
483 options.webkit_test_runner = True
485 # Don't maintain render tree dump results for Apple Windows port.
486 if port.port_name == "win":
487 options.ignore_render_tree_dump_results = True
490 options.additional_env_var.append("JSC_usePoisoning=0")
491 options.additional_env_var.append("__XPC_JSC_usePoisoning=0")
493 def run(port, options, args, logging_stream):
494 logger = logging.getLogger()
495 logger.setLevel(logging.DEBUG if options.debug_rwt_logging else logging.INFO)
498 printer = printing.Printer(port, options, logging_stream, logger=logger)
500 _set_up_derived_options(port, options)
501 manager = Manager(port, options, printer)
502 printer.print_config(port.results_directory())
504 run_details = manager.run(args)
505 _log.debug("Testing completed, Exit status: %d" % run_details.exit_code)
510 if __name__ == '__main__':
511 sys.exit(main(sys.argv[1:], sys.stdout, sys.stderr))