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

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

Issue 558883003: [Android] Allow instrumentation test skipping. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « build/android/pylib/instrumentation/test_runner_test.py ('k') | no next file » | 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 collections 9 import collections
10 import logging 10 import logging
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 option_parser.add_option( 168 option_parser.add_option(
169 '-A', '--annotation', dest='annotation_str', 169 '-A', '--annotation', dest='annotation_str',
170 help=('Comma-separated list of annotations. Run only tests with any of ' 170 help=('Comma-separated list of annotations. Run only tests with any of '
171 'the given annotations. An annotation can be either a key or a ' 171 'the given annotations. An annotation can be either a key or a '
172 'key-values pair. A test that has no annotation is considered ' 172 'key-values pair. A test that has no annotation is considered '
173 '"SmallTest".')) 173 '"SmallTest".'))
174 option_parser.add_option( 174 option_parser.add_option(
175 '-E', '--exclude-annotation', dest='exclude_annotation_str', 175 '-E', '--exclude-annotation', dest='exclude_annotation_str',
176 help=('Comma-separated list of annotations. Exclude tests with these ' 176 help=('Comma-separated list of annotations. Exclude tests with these '
177 'annotations.')) 177 'annotations.'))
178 option_parser.add_option('--screenshot', dest='screenshot_failures', 178 option_parser.add_option(
179 action='store_true', 179 '--screenshot', dest='screenshot_failures', action='store_true',
180 help='Capture screenshots of test failures') 180 help='Capture screenshots of test failures')
181 option_parser.add_option('--save-perf-json', action='store_true', 181 option_parser.add_option(
182 help='Saves the JSON file for each UI Perf test.') 182 '--save-perf-json', action='store_true',
183 option_parser.add_option('--official-build', action='store_true', 183 help='Saves the JSON file for each UI Perf test.')
184 help='Run official build tests.') 184 option_parser.add_option(
185 option_parser.add_option('--test_data', action='append', default=[], 185 '--official-build', action='store_true', help='Run official build tests.')
186 help=('Each instance defines a directory of test ' 186 option_parser.add_option(
187 'data that should be copied to the target(s) ' 187 '--test_data', '--test-data', action='append', default=[],
188 'before running the tests. The argument ' 188 help=('Each instance defines a directory of test data that should be '
189 'should be of the form <target>:<source>, ' 189 'copied to the target(s) before running the tests. The argument '
190 '<target> is relative to the device data' 190 'should be of the form <target>:<source>, <target> is relative to '
191 'directory, and <source> is relative to the ' 191 'the device data directory, and <source> is relative to the '
192 'chromium build directory.')) 192 'chromium build directory.'))
193 193
194 194
195 def ProcessJavaTestOptions(options): 195 def ProcessJavaTestOptions(options):
196 """Processes options/arguments and populates |options| with defaults.""" 196 """Processes options/arguments and populates |options| with defaults."""
197 197
198 if options.annotation_str: 198 if options.annotation_str:
199 options.annotations = options.annotation_str.split(',') 199 options.annotations = options.annotation_str.split(',')
200 elif options.test_filter: 200 elif options.test_filter:
201 options.annotations = [] 201 options.annotations = []
202 else: 202 else:
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 835
836 def main(): 836 def main():
837 signal.signal(signal.SIGUSR1, DumpThreadStacks) 837 signal.signal(signal.SIGUSR1, DumpThreadStacks)
838 option_parser = command_option_parser.CommandOptionParser( 838 option_parser = command_option_parser.CommandOptionParser(
839 commands_dict=VALID_COMMANDS) 839 commands_dict=VALID_COMMANDS)
840 return command_option_parser.ParseAndExecute(option_parser) 840 return command_option_parser.ParseAndExecute(option_parser)
841 841
842 842
843 if __name__ == '__main__': 843 if __name__ == '__main__':
844 sys.exit(main()) 844 sys.exit(main())
OLDNEW
« no previous file with comments | « build/android/pylib/instrumentation/test_runner_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698