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

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

Issue 1661253002: test_runner.py Add --fast-local-dev flag (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tests-no-clear-data
Patch Set: rebase 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
« no previous file with comments | « no previous file | build/config/android/internal_rules.gni » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 help=('Specify the absolute path of the adb binary that ' 106 help=('Specify the absolute path of the adb binary that '
107 'should be used.')) 107 'should be used.'))
108 group.add_argument('--json-results-file', '--test-launcher-summary-output', 108 group.add_argument('--json-results-file', '--test-launcher-summary-output',
109 dest='json_results_file', 109 dest='json_results_file',
110 help='If set, will dump results in JSON form ' 110 help='If set, will dump results in JSON form '
111 'to specified file.') 111 'to specified file.')
112 group.add_argument('--logcat-output-dir', 112 group.add_argument('--logcat-output-dir',
113 help='If set, will dump logcats recorded during test run ' 113 help='If set, will dump logcats recorded during test run '
114 'to directory. File names will be the device ids.') 114 'to directory. File names will be the device ids.')
115 115
116 class FastLocalDevAction(argparse.Action):
117 def __call__(self, parser, namespace, values, option_string=None):
118 namespace.verbose_count = max(namespace.verbose_count, 1)
119 namespace.num_retries = 0
120 namespace.enable_device_cache = True
121 namespace.skip_clear_data = True
122 namespace.extract_test_list_from_filter = True
123
124 group.add_argument('--fast-local-dev', type=bool, nargs=0,
125 action=FastLocalDevAction,
126 help='Alias for: --verbose --num-retries=0 '
127 '--enable-device-cache --skip-clear-data '
128 '--extract-test-list-from-filter')
129
116 def ProcessCommonOptions(args): 130 def ProcessCommonOptions(args):
117 """Processes and handles all common options.""" 131 """Processes and handles all common options."""
118 run_tests_helper.SetLogLevel(args.verbose_count) 132 run_tests_helper.SetLogLevel(args.verbose_count)
119 constants.SetBuildType(args.build_type) 133 constants.SetBuildType(args.build_type)
120 if args.build_directory: 134 if args.build_directory:
121 constants.SetBuildDirectory(args.build_directory) 135 constants.SetBuildDirectory(args.build_directory)
122 if args.output_directory: 136 if args.output_directory:
123 constants.SetOutputDirectory(args.output_directory) 137 constants.SetOutputDirectory(args.output_directory)
124 138
125 devil_custom_deps = None 139 devil_custom_deps = None
(...skipping 980 matching lines...) Expand 10 before | Expand all | Expand 10 after
1106 if e.is_infra_error: 1120 if e.is_infra_error:
1107 return constants.INFRA_EXIT_CODE 1121 return constants.INFRA_EXIT_CODE
1108 return constants.ERROR_EXIT_CODE 1122 return constants.ERROR_EXIT_CODE
1109 except: # pylint: disable=W0702 1123 except: # pylint: disable=W0702
1110 logging.exception('Unrecognized error occurred.') 1124 logging.exception('Unrecognized error occurred.')
1111 return constants.ERROR_EXIT_CODE 1125 return constants.ERROR_EXIT_CODE
1112 1126
1113 1127
1114 if __name__ == '__main__': 1128 if __name__ == '__main__':
1115 sys.exit(main()) 1129 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | build/config/android/internal_rules.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698