OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright 2013 The Chromium Authors. All rights reserved. | 3 # Copyright 2013 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 """Runs all types of tests from one unified interface.""" | 7 """Runs all types of tests from one unified interface.""" |
8 | 8 |
9 import argparse | 9 import argparse |
10 import collections | 10 import collections |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 '(increases flakiness)') | 242 '(increases flakiness)') |
243 | 243 |
244 | 244 |
245 def AddGTestOptions(parser): | 245 def AddGTestOptions(parser): |
246 """Adds gtest options to |parser|.""" | 246 """Adds gtest options to |parser|.""" |
247 | 247 |
248 group = parser.add_argument_group('GTest Options') | 248 group = parser.add_argument_group('GTest Options') |
249 group.add_argument('-s', '--suite', dest='suite_name', | 249 group.add_argument('-s', '--suite', dest='suite_name', |
250 nargs='+', metavar='SUITE_NAME', required=True, | 250 nargs='+', metavar='SUITE_NAME', required=True, |
251 help='Executable name of the test suite to run.') | 251 help='Executable name of the test suite to run.') |
| 252 group.add_argument('--executable-dist-dir', |
| 253 help="Path to executable's dist directory for native" |
| 254 " (non-apk) tests.") |
252 group.add_argument('--test-apk-incremental-install-script', | 255 group.add_argument('--test-apk-incremental-install-script', |
253 help='Path to install script for the test apk.') | 256 help='Path to install script for the test apk.') |
254 group.add_argument('--gtest_also_run_disabled_tests', | 257 group.add_argument('--gtest_also_run_disabled_tests', |
255 '--gtest-also-run-disabled-tests', | 258 '--gtest-also-run-disabled-tests', |
256 dest='run_disabled', action='store_true', | 259 dest='run_disabled', action='store_true', |
257 help='Also run disabled tests if applicable.') | 260 help='Also run disabled tests if applicable.') |
258 group.add_argument('-a', '--test-arguments', dest='test_arguments', | 261 group.add_argument('-a', '--test-arguments', dest='test_arguments', |
259 default='', | 262 default='', |
260 help='Additional arguments to pass to the test.') | 263 help='Additional arguments to pass to the test.') |
261 group.add_argument('-t', '--shard-timeout', | 264 group.add_argument('-t', '--shard-timeout', |
(...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1137 if e.is_infra_error: | 1140 if e.is_infra_error: |
1138 return constants.INFRA_EXIT_CODE | 1141 return constants.INFRA_EXIT_CODE |
1139 return constants.ERROR_EXIT_CODE | 1142 return constants.ERROR_EXIT_CODE |
1140 except: # pylint: disable=W0702 | 1143 except: # pylint: disable=W0702 |
1141 logging.exception('Unrecognized error occurred.') | 1144 logging.exception('Unrecognized error occurred.') |
1142 return constants.ERROR_EXIT_CODE | 1145 return constants.ERROR_EXIT_CODE |
1143 | 1146 |
1144 | 1147 |
1145 if __name__ == '__main__': | 1148 if __name__ == '__main__': |
1146 sys.exit(main()) | 1149 sys.exit(main()) |
OLD | NEW |