Chromium Code Reviews| 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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 247 group.add_argument('--delete-stale-data', dest='delete_stale_data', | 247 group.add_argument('--delete-stale-data', dest='delete_stale_data', |
| 248 action='store_true', | 248 action='store_true', |
| 249 help='Delete stale test data on the device.') | 249 help='Delete stale test data on the device.') |
| 250 group.add_argument('--repeat', '--gtest_repeat', '--gtest-repeat', | 250 group.add_argument('--repeat', '--gtest_repeat', '--gtest-repeat', |
| 251 dest='repeat', type=int, default=0, | 251 dest='repeat', type=int, default=0, |
| 252 help='Number of times to repeat the specified set of ' | 252 help='Number of times to repeat the specified set of ' |
| 253 'tests.') | 253 'tests.') |
| 254 group.add_argument('--break-on-failure', '--break_on_failure', | 254 group.add_argument('--break-on-failure', '--break_on_failure', |
| 255 dest='break_on_failure', action='store_true', | 255 dest='break_on_failure', action='store_true', |
| 256 help='Whether to break on failure.') | 256 help='Whether to break on failure.') |
| 257 group.add_argument('--extract-test-list-from-filter', | |
| 258 action='store_true', | |
| 259 help='When a test filter is specified, and the list of ' | |
| 260 'tests can be determined from it, skip querying the ' | |
|
jbudorick
2016/02/03 14:25:17
nit: indent to opening '
agrieve
2016/02/03 16:02:02
Done.
| |
| 261 'device for the list of all tests. Speeds up local ' | |
| 262 'development, but is not safe to use on bots (' | |
| 263 'http://crbug.com/549214') | |
| 257 | 264 |
| 258 filter_group = group.add_mutually_exclusive_group() | 265 filter_group = group.add_mutually_exclusive_group() |
| 259 filter_group.add_argument('-f', '--gtest_filter', '--gtest-filter', | 266 filter_group.add_argument('-f', '--gtest_filter', '--gtest-filter', |
| 260 dest='test_filter', | 267 dest='test_filter', |
| 261 help='googletest-style filter string.') | 268 help='googletest-style filter string.') |
| 262 filter_group.add_argument('--gtest-filter-file', dest='test_filter_file', | 269 filter_group.add_argument('--gtest-filter-file', dest='test_filter_file', |
| 263 help='Path to file that contains googletest-style ' | 270 help='Path to file that contains googletest-style ' |
| 264 'filter strings. (Lines will be joined with ' | 271 'filter strings. (Lines will be joined with ' |
| 265 '":" to create a single filter string.)') | 272 '":" to create a single filter string.)') |
| 266 | 273 |
| (...skipping 819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1086 if e.is_infra_error: | 1093 if e.is_infra_error: |
| 1087 return constants.INFRA_EXIT_CODE | 1094 return constants.INFRA_EXIT_CODE |
| 1088 return constants.ERROR_EXIT_CODE | 1095 return constants.ERROR_EXIT_CODE |
| 1089 except: # pylint: disable=W0702 | 1096 except: # pylint: disable=W0702 |
| 1090 logging.exception('Unrecognized error occurred.') | 1097 logging.exception('Unrecognized error occurred.') |
| 1091 return constants.ERROR_EXIT_CODE | 1098 return constants.ERROR_EXIT_CODE |
| 1092 | 1099 |
| 1093 | 1100 |
| 1094 if __name__ == '__main__': | 1101 if __name__ == '__main__': |
| 1095 sys.exit(main()) | 1102 sys.exit(main()) |
| OLD | NEW |