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 import constants | 7 import constants |
8 import optparse | 8 import optparse |
9 import os | 9 import os |
10 import sys | 10 import sys |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 option_parser.add_option('--save-perf-json', action='store_true', | 102 option_parser.add_option('--save-perf-json', action='store_true', |
103 help='Saves the JSON file for each UI Perf test.') | 103 help='Saves the JSON file for each UI Perf test.') |
104 option_parser.add_option('--shard_retries', type=int, default=1, | 104 option_parser.add_option('--shard_retries', type=int, default=1, |
105 help=('Number of times to retry each failure when ' | 105 help=('Number of times to retry each failure when ' |
106 'sharding.')) | 106 'sharding.')) |
107 option_parser.add_option('--official-build', help='Run official build tests.') | 107 option_parser.add_option('--official-build', help='Run official build tests.') |
108 option_parser.add_option('--device', | 108 option_parser.add_option('--device', |
109 help='Serial number of device we should use.') | 109 help='Serial number of device we should use.') |
110 option_parser.add_option('--python_test_root', | 110 option_parser.add_option('--python_test_root', |
111 help='Root of the python-driven tests.') | 111 help='Root of the python-driven tests.') |
| 112 option_parser.add_option('--keep_test_server_ports', |
| 113 action='store_true', |
| 114 help='Indicates the test server ports must be ' |
| 115 'kept. When this is run via a sharder ' |
| 116 'the test server ports should be kept and ' |
| 117 'should not be reset.') |
112 option_parser.add_option('--flakiness-dashboard-server', | 118 option_parser.add_option('--flakiness-dashboard-server', |
113 dest='flakiness_dashboard_server', | 119 dest='flakiness_dashboard_server', |
114 help=('Address of the server that is hosting the ' | 120 help=('Address of the server that is hosting the ' |
115 'Chrome for Android flakiness dashboard.')) | 121 'Chrome for Android flakiness dashboard.')) |
116 option_parser.add_option('--buildbot-step-failure', | 122 option_parser.add_option('--buildbot-step-failure', |
117 action='store_true', | 123 action='store_true', |
118 help=('If present, will set the buildbot status ' | 124 help=('If present, will set the buildbot status ' |
119 'as STEP_FAILURE, otherwise as STEP_WARNINGS ' | 125 'as STEP_FAILURE, otherwise as STEP_WARNINGS ' |
120 'when test(s) fail.')) | 126 'when test(s) fail.')) |
121 | 127 |
(...skipping 25 matching lines...) Expand all Loading... |
147 '%s.apk' % options.test_apk) | 153 '%s.apk' % options.test_apk) |
148 options.test_apk_jar_path = os.path.join( | 154 options.test_apk_jar_path = os.path.join( |
149 _SDK_OUT_DIR, options.build_type, constants.SDK_BUILD_TEST_JAVALIB_DIR, | 155 _SDK_OUT_DIR, options.build_type, constants.SDK_BUILD_TEST_JAVALIB_DIR, |
150 '%s.jar' % options.test_apk) | 156 '%s.jar' % options.test_apk) |
151 if options.annotation_str: | 157 if options.annotation_str: |
152 options.annotation = options.annotation_str.split() | 158 options.annotation = options.annotation_str.split() |
153 elif options.test_filter: | 159 elif options.test_filter: |
154 options.annotation = [] | 160 options.annotation = [] |
155 else: | 161 else: |
156 options.annotation = ['Smoke', 'SmallTest', 'MediumTest', 'LargeTest'] | 162 options.annotation = ['Smoke', 'SmallTest', 'MediumTest', 'LargeTest'] |
OLD | NEW |