| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 """A tool used to run a Chrome test executable and process the output. | 6 """A tool used to run a Chrome test executable and process the output. |
| 7 | 7 |
| 8 This script is used by the buildbot slaves. It must be run from the outer | 8 This script is used by the buildbot slaves. It must be run from the outer |
| 9 build directory, e.g. chrome-release/build/. | 9 build directory, e.g. chrome-release/build/. |
| 10 | 10 |
| (...skipping 1498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1509 Python scripts are the same as with Linux. | 1509 Python scripts are the same as with Linux. |
| 1510 | 1510 |
| 1511 Args: | 1511 Args: |
| 1512 options: Command-line options for this invocation of runtest.py. | 1512 options: Command-line options for this invocation of runtest.py. |
| 1513 args: Command and arguments for the test. | 1513 args: Command and arguments for the test. |
| 1514 extra_env: A dictionary of extra environment variables to set. | 1514 extra_env: A dictionary of extra environment variables to set. |
| 1515 | 1515 |
| 1516 Returns: | 1516 Returns: |
| 1517 Exit status code. | 1517 Exit status code. |
| 1518 """ | 1518 """ |
| 1519 if not os.environ.get('CHROMIUM_OUTPUT_DIR') and options.target: |
| 1520 extra_env['CHROMIUM_OUTPUT_DIR'] = ( |
| 1521 os.path.abspath(os.path.join(options.build_dir, options.target))) |
| 1519 if options.run_python_script: | 1522 if options.run_python_script: |
| 1520 return _MainLinux(options, args, extra_env) | 1523 return _MainLinux(options, args, extra_env) |
| 1521 | 1524 |
| 1522 if len(args) < 1: | 1525 if len(args) < 1: |
| 1523 raise chromium_utils.MissingArgument('Usage: %s' % USAGE) | 1526 raise chromium_utils.MissingArgument('Usage: %s' % USAGE) |
| 1524 | 1527 |
| 1525 if _ListLogProcessors(options.annotate): | 1528 if _ListLogProcessors(options.annotate): |
| 1526 return 0 | 1529 return 0 |
| 1527 log_processor_class = _SelectLogProcessor(options, False) | 1530 log_processor_class = _SelectLogProcessor(options, False) |
| 1528 log_processor = _CreateLogProcessor(log_processor_class, options, None) | 1531 log_processor = _CreateLogProcessor(log_processor_class, options, None) |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1938 finally: | 1941 finally: |
| 1939 if did_launch_dbus: | 1942 if did_launch_dbus: |
| 1940 # It looks like the command line argument --exit-with-session | 1943 # It looks like the command line argument --exit-with-session |
| 1941 # isn't working to clean up the spawned dbus-daemon. Kill it | 1944 # isn't working to clean up the spawned dbus-daemon. Kill it |
| 1942 # manually. | 1945 # manually. |
| 1943 _ShutdownDBus() | 1946 _ShutdownDBus() |
| 1944 | 1947 |
| 1945 | 1948 |
| 1946 if '__main__' == __name__: | 1949 if '__main__' == __name__: |
| 1947 sys.exit(main()) | 1950 sys.exit(main()) |
| OLD | NEW |