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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 | 259 |
260 | 260 |
261 def AddJavaTestOptions(argument_group): | 261 def AddJavaTestOptions(argument_group): |
262 """Adds the Java test options to |option_parser|.""" | 262 """Adds the Java test options to |option_parser|.""" |
263 | 263 |
264 argument_group.add_argument( | 264 argument_group.add_argument( |
265 '-f', '--test-filter', '--gtest_filter', '--gtest-filter', | 265 '-f', '--test-filter', '--gtest_filter', '--gtest-filter', |
266 dest='test_filter', | 266 dest='test_filter', |
267 help=('Test filter (if not fully qualified, will run all matches).')) | 267 help=('Test filter (if not fully qualified, will run all matches).')) |
268 argument_group.add_argument( | 268 argument_group.add_argument( |
269 '--repeat', dest='repeat', type=int, default=0, | 269 '--repeat', '--gtest_repeat', '--gtest-repeat', dest='repeat', |
| 270 type=int, default=0, |
270 help='Number of times to repeat the specified set of tests.') | 271 help='Number of times to repeat the specified set of tests.') |
271 argument_group.add_argument( | 272 argument_group.add_argument( |
272 '--break-on-failure', '--break_on_failure', | 273 '--break-on-failure', '--break_on_failure', |
273 dest='break_on_failure', action='store_true', | 274 dest='break_on_failure', action='store_true', |
274 help='Whether to break on failure.') | 275 help='Whether to break on failure.') |
275 argument_group.add_argument( | 276 argument_group.add_argument( |
276 '-A', '--annotation', dest='annotation_str', | 277 '-A', '--annotation', dest='annotation_str', |
277 help=('Comma-separated list of annotations. Run only tests with any of ' | 278 help=('Comma-separated list of annotations. Run only tests with any of ' |
278 'the given annotations. An annotation can be either a key or a ' | 279 'the given annotations. An annotation can be either a key or a ' |
279 'key-values pair. A test that has no annotation is considered ' | 280 'key-values pair. A test that has no annotation is considered ' |
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
857 if e.is_infra_error: | 858 if e.is_infra_error: |
858 return constants.INFRA_EXIT_CODE | 859 return constants.INFRA_EXIT_CODE |
859 return constants.ERROR_EXIT_CODE | 860 return constants.ERROR_EXIT_CODE |
860 except: # pylint: disable=W0702 | 861 except: # pylint: disable=W0702 |
861 logging.exception('Unrecognized error occurred.') | 862 logging.exception('Unrecognized error occurred.') |
862 return constants.ERROR_EXIT_CODE | 863 return constants.ERROR_EXIT_CODE |
863 | 864 |
864 | 865 |
865 if __name__ == '__main__': | 866 if __name__ == '__main__': |
866 sys.exit(main()) | 867 sys.exit(main()) |
OLD | NEW |