OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 """Parses options for the instrumentation tests.""" | 5 """Parses options for the instrumentation tests.""" |
6 | 6 |
7 #TODO(craigdh): pylib/utils/ should not depend on pylib/. | 7 #TODO(craigdh): pylib/utils/ should not depend on pylib/. |
8 from pylib import constants | 8 from pylib import constants |
9 | 9 |
10 import optparse | 10 import optparse |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 help='Run tests in a new instance of emulator.') | 108 help='Run tests in a new instance of emulator.') |
109 option_parser.add_option('-n', '--emulator_count', | 109 option_parser.add_option('-n', '--emulator_count', |
110 type='int', default=1, | 110 type='int', default=1, |
111 help='Number of emulators to launch for running the ' | 111 help='Number of emulators to launch for running the ' |
112 'tests.') | 112 'tests.') |
113 option_parser.add_option('-x', '--xvfb', dest='use_xvfb', | 113 option_parser.add_option('-x', '--xvfb', dest='use_xvfb', |
114 action='store_true', | 114 action='store_true', |
115 help='Use Xvfb around tests (ignored if not Linux).') | 115 help='Use Xvfb around tests (ignored if not Linux).') |
116 option_parser.add_option('--webkit', action='store_true', | 116 option_parser.add_option('--webkit', action='store_true', |
117 help='Run the tests from a WebKit checkout.') | 117 help='Run the tests from a WebKit checkout.') |
118 option_parser.add_option('--fast', '--fast_and_loose', dest='fast_and_loose', | |
119 action='store_true', | |
120 help='Go faster (but be less stable), ' | |
121 'for quick testing. Example: when tracking down ' | |
122 'tests that hang to add to the disabled list, ' | |
123 'there is no need to redeploy the test binary ' | |
124 'or data to the device again. ' | |
125 'Don\'t use on bots by default!') | |
126 option_parser.add_option('--repeat', dest='repeat', type='int', | 118 option_parser.add_option('--repeat', dest='repeat', type='int', |
127 default=2, | 119 default=2, |
128 help='Repeat count on test timeout.') | 120 help='Repeat count on test timeout.') |
129 option_parser.add_option('--exit_code', action='store_true', | 121 option_parser.add_option('--exit_code', action='store_true', |
130 help='If set, the exit code will be total number ' | 122 help='If set, the exit code will be total number ' |
131 'of failures.') | 123 'of failures.') |
132 option_parser.add_option('--exe', action='store_true', | 124 option_parser.add_option('--exe', action='store_true', |
133 help='If set, use the exe test runner instead of ' | 125 help='If set, use the exe test runner instead of ' |
134 'the APK.') | 126 'the APK.') |
135 | 127 |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 '%s.apk' % options.test_apk) | 222 '%s.apk' % options.test_apk) |
231 options.test_apk_jar_path = os.path.join( | 223 options.test_apk_jar_path = os.path.join( |
232 _SDK_OUT_DIR, options.build_type, constants.SDK_BUILD_TEST_JAVALIB_DIR, | 224 _SDK_OUT_DIR, options.build_type, constants.SDK_BUILD_TEST_JAVALIB_DIR, |
233 '%s.jar' % options.test_apk) | 225 '%s.jar' % options.test_apk) |
234 if options.annotation_str: | 226 if options.annotation_str: |
235 options.annotation = options.annotation_str.split() | 227 options.annotation = options.annotation_str.split() |
236 elif options.test_filter: | 228 elif options.test_filter: |
237 options.annotation = [] | 229 options.annotation = [] |
238 else: | 230 else: |
239 options.annotation = ['Smoke', 'SmallTest', 'MediumTest', 'LargeTest'] | 231 options.annotation = ['Smoke', 'SmallTest', 'MediumTest', 'LargeTest'] |
OLD | NEW |