Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(636)

Side by Side Diff: build/android/test_runner.py

Issue 1576473002: Android gtest runner: Only query device for test list when necessary (take 2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: indentation fix Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 group.add_argument('--delete-stale-data', dest='delete_stale_data', 250 group.add_argument('--delete-stale-data', dest='delete_stale_data',
251 action='store_true', 251 action='store_true',
252 help='Delete stale test data on the device.') 252 help='Delete stale test data on the device.')
253 group.add_argument('--repeat', '--gtest_repeat', '--gtest-repeat', 253 group.add_argument('--repeat', '--gtest_repeat', '--gtest-repeat',
254 dest='repeat', type=int, default=0, 254 dest='repeat', type=int, default=0,
255 help='Number of times to repeat the specified set of ' 255 help='Number of times to repeat the specified set of '
256 'tests.') 256 'tests.')
257 group.add_argument('--break-on-failure', '--break_on_failure', 257 group.add_argument('--break-on-failure', '--break_on_failure',
258 dest='break_on_failure', action='store_true', 258 dest='break_on_failure', action='store_true',
259 help='Whether to break on failure.') 259 help='Whether to break on failure.')
260 group.add_argument('--extract-test-list-from-filter',
261 action='store_true',
262 help='When a test filter is specified, and the list of '
263 'tests can be determined from it, skip querying the '
264 'device for the list of all tests. Speeds up local '
265 'development, but is not safe to use on bots ('
266 'http://crbug.com/549214')
260 267
261 filter_group = group.add_mutually_exclusive_group() 268 filter_group = group.add_mutually_exclusive_group()
262 filter_group.add_argument('-f', '--gtest_filter', '--gtest-filter', 269 filter_group.add_argument('-f', '--gtest_filter', '--gtest-filter',
263 dest='test_filter', 270 dest='test_filter',
264 help='googletest-style filter string.') 271 help='googletest-style filter string.')
265 filter_group.add_argument('--gtest-filter-file', dest='test_filter_file', 272 filter_group.add_argument('--gtest-filter-file', dest='test_filter_file',
266 help='Path to file that contains googletest-style ' 273 help='Path to file that contains googletest-style '
267 'filter strings. (Lines will be joined with ' 274 'filter strings. (Lines will be joined with '
268 '":" to create a single filter string.)') 275 '":" to create a single filter string.)')
269 276
(...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after
1094 if e.is_infra_error: 1101 if e.is_infra_error:
1095 return constants.INFRA_EXIT_CODE 1102 return constants.INFRA_EXIT_CODE
1096 return constants.ERROR_EXIT_CODE 1103 return constants.ERROR_EXIT_CODE
1097 except: # pylint: disable=W0702 1104 except: # pylint: disable=W0702
1098 logging.exception('Unrecognized error occurred.') 1105 logging.exception('Unrecognized error occurred.')
1099 return constants.ERROR_EXIT_CODE 1106 return constants.ERROR_EXIT_CODE
1100 1107
1101 1108
1102 if __name__ == '__main__': 1109 if __name__ == '__main__':
1103 sys.exit(main()) 1110 sys.exit(main())
OLDNEW
« no previous file with comments | « build/android/pylib/local/device/local_device_gtest_run.py ('k') | build/config/android/internal_rules.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698