| 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 1619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1630 help='Enable uninitialized memory reads detection ' | 1630 help='Enable uninitialized memory reads detection ' |
| 1631 '(MemorySanitizer).') | 1631 '(MemorySanitizer).') |
| 1632 option_parser.add_option('--enable-tsan', action='store_true', default=False, | 1632 option_parser.add_option('--enable-tsan', action='store_true', default=False, |
| 1633 help='Enable data race detection ' | 1633 help='Enable data race detection ' |
| 1634 '(ThreadSanitizer).') | 1634 '(ThreadSanitizer).') |
| 1635 option_parser.add_option('--strip-path-prefix', | 1635 option_parser.add_option('--strip-path-prefix', |
| 1636 default='build/src/out/Release/../../', | 1636 default='build/src/out/Release/../../', |
| 1637 help='Source paths in stack traces will be stripped ' | 1637 help='Source paths in stack traces will be stripped ' |
| 1638 'of prefixes ending with this substring. This ' | 1638 'of prefixes ending with this substring. This ' |
| 1639 'option is used by sanitizer tools.') | 1639 'option is used by sanitizer tools.') |
| 1640 option_parser.add_option('--no-spawn-dbus', action='store_true', | |
| 1641 default=False, | |
| 1642 help='Disable GLib DBus bug workaround: ' | |
| 1643 'manually spawning dbus-launch') | |
| 1644 option_parser.add_option('--test-launcher-summary-output', | 1640 option_parser.add_option('--test-launcher-summary-output', |
| 1645 help='Path to test results file with all the info ' | 1641 help='Path to test results file with all the info ' |
| 1646 'from the test launcher') | 1642 'from the test launcher') |
| 1647 option_parser.add_option('--flakiness-dashboard-server', | 1643 option_parser.add_option('--flakiness-dashboard-server', |
| 1648 help='The flakiness dashboard server to which the ' | 1644 help='The flakiness dashboard server to which the ' |
| 1649 'results should be uploaded.') | 1645 'results should be uploaded.') |
| 1650 option_parser.add_option('--verbose', action='store_true', default=False, | 1646 option_parser.add_option('--verbose', action='store_true', default=False, |
| 1651 help='Prints more information.') | 1647 help='Prints more information.') |
| 1652 | 1648 |
| 1653 chromium_utils.AddPropertiesOptions(option_parser) | 1649 chromium_utils.AddPropertiesOptions(option_parser) |
| (...skipping 16 matching lines...) Expand all Loading... |
| 1670 options.test_type = options.test_type or options.factory_properties.get( | 1666 options.test_type = options.test_type or options.factory_properties.get( |
| 1671 'step_name', '') | 1667 'step_name', '') |
| 1672 | 1668 |
| 1673 if options.run_shell_script and options.run_python_script: | 1669 if options.run_shell_script and options.run_python_script: |
| 1674 sys.stderr.write('Use either --run-shell-script OR --run-python-script, ' | 1670 sys.stderr.write('Use either --run-shell-script OR --run-python-script, ' |
| 1675 'not both.') | 1671 'not both.') |
| 1676 return 1 | 1672 return 1 |
| 1677 | 1673 |
| 1678 print '[Running on builder: "%s"]' % options.builder_name | 1674 print '[Running on builder: "%s"]' % options.builder_name |
| 1679 | 1675 |
| 1680 did_launch_dbus = False | 1676 did_launch_dbus = _LaunchDBus() |
| 1681 if not options.no_spawn_dbus: | |
| 1682 did_launch_dbus = _LaunchDBus() | |
| 1683 | 1677 |
| 1684 try: | 1678 try: |
| 1685 options.build_dir = build_directory.GetBuildOutputDirectory() | 1679 options.build_dir = build_directory.GetBuildOutputDirectory() |
| 1686 | 1680 |
| 1687 if options.pass_target and options.target: | 1681 if options.pass_target and options.target: |
| 1688 args.extend(['--target', options.target]) | 1682 args.extend(['--target', options.target]) |
| 1689 if options.pass_build_dir: | 1683 if options.pass_build_dir: |
| 1690 args.extend(['--build-dir', options.build_dir]) | 1684 args.extend(['--build-dir', options.build_dir]) |
| 1691 | 1685 |
| 1692 # We will use this to accumulate overrides for the command under test, | 1686 # We will use this to accumulate overrides for the command under test, |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1773 finally: | 1767 finally: |
| 1774 if did_launch_dbus: | 1768 if did_launch_dbus: |
| 1775 # It looks like the command line argument --exit-with-session | 1769 # It looks like the command line argument --exit-with-session |
| 1776 # isn't working to clean up the spawned dbus-daemon. Kill it | 1770 # isn't working to clean up the spawned dbus-daemon. Kill it |
| 1777 # manually. | 1771 # manually. |
| 1778 _ShutdownDBus() | 1772 _ShutdownDBus() |
| 1779 | 1773 |
| 1780 | 1774 |
| 1781 if '__main__' == __name__: | 1775 if '__main__' == __name__: |
| 1782 sys.exit(main()) | 1776 sys.exit(main()) |
| OLD | NEW |