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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 'traceview'] | 66 'traceview'] |
67 option_parser.add_option('--profiler', dest='profilers', action='append', | 67 option_parser.add_option('--profiler', dest='profilers', action='append', |
68 choices=profilers, | 68 choices=profilers, |
69 help='Profiling tool to run during test. ' | 69 help='Profiling tool to run during test. ' |
70 'Pass multiple times to run multiple profilers. ' | 70 'Pass multiple times to run multiple profilers. ' |
71 'Available profilers: %s' % profilers) | 71 'Available profilers: %s' % profilers) |
72 option_parser.add_option('--tool', | 72 option_parser.add_option('--tool', |
73 dest='tool', | 73 dest='tool', |
74 help='Run the test under a tool ' | 74 help='Run the test under a tool ' |
75 '(use --tool help to list them)') | 75 '(use --tool help to list them)') |
| 76 option_parser.add_option('--flakiness-dashboard-server', |
| 77 dest='flakiness_dashboard_server', |
| 78 help=('Address of the server that is hosting the ' |
| 79 'Chrome for Android flakiness dashboard.')) |
76 AddBuildTypeOption(option_parser) | 80 AddBuildTypeOption(option_parser) |
77 | 81 |
78 | 82 |
79 def AddInstrumentationOptions(option_parser): | 83 def AddInstrumentationOptions(option_parser): |
80 """Decorates OptionParser with instrumentation tests options.""" | 84 """Decorates OptionParser with instrumentation tests options.""" |
81 | 85 |
82 AddTestRunnerOptions(option_parser) | 86 AddTestRunnerOptions(option_parser) |
83 option_parser.add_option('-w', '--wait_debugger', dest='wait_for_debugger', | 87 option_parser.add_option('-w', '--wait_debugger', dest='wait_for_debugger', |
84 action='store_true', help='Wait for debugger.') | 88 action='store_true', help='Wait for debugger.') |
85 option_parser.add_option('-I', dest='install_apk', help='Install APK.', | 89 option_parser.add_option('-I', dest='install_apk', help='Install APK.', |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 option_parser.add_option('--device', | 123 option_parser.add_option('--device', |
120 help='Serial number of device we should use.') | 124 help='Serial number of device we should use.') |
121 option_parser.add_option('--python_test_root', | 125 option_parser.add_option('--python_test_root', |
122 help='Root of the python-driven tests.') | 126 help='Root of the python-driven tests.') |
123 option_parser.add_option('--keep_test_server_ports', | 127 option_parser.add_option('--keep_test_server_ports', |
124 action='store_true', | 128 action='store_true', |
125 help='Indicates the test server ports must be ' | 129 help='Indicates the test server ports must be ' |
126 'kept. When this is run via a sharder ' | 130 'kept. When this is run via a sharder ' |
127 'the test server ports should be kept and ' | 131 'the test server ports should be kept and ' |
128 'should not be reset.') | 132 'should not be reset.') |
129 option_parser.add_option('--flakiness-dashboard-server', | |
130 dest='flakiness_dashboard_server', | |
131 help=('Address of the server that is hosting the ' | |
132 'Chrome for Android flakiness dashboard.')) | |
133 option_parser.add_option('--buildbot-step-failure', | 133 option_parser.add_option('--buildbot-step-failure', |
134 action='store_true', | 134 action='store_true', |
135 help=('If present, will set the buildbot status ' | 135 help=('If present, will set the buildbot status ' |
136 'as STEP_FAILURE, otherwise as STEP_WARNINGS ' | 136 'as STEP_FAILURE, otherwise as STEP_WARNINGS ' |
137 'when test(s) fail.')) | 137 'when test(s) fail.')) |
138 option_parser.add_option('--disable_assertions', action='store_true', | 138 option_parser.add_option('--disable_assertions', action='store_true', |
139 help='Run with java assertions disabled.') | 139 help='Run with java assertions disabled.') |
140 option_parser.add_option('--test_data', action='append', default=[], | 140 option_parser.add_option('--test_data', action='append', default=[], |
141 help=('Each instance defines a directory of test ' | 141 help=('Each instance defines a directory of test ' |
142 'data that should be copied to the target(s) ' | 142 'data that should be copied to the target(s) ' |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 '%s.apk' % options.test_apk) | 175 '%s.apk' % options.test_apk) |
176 options.test_apk_jar_path = os.path.join( | 176 options.test_apk_jar_path = os.path.join( |
177 _SDK_OUT_DIR, options.build_type, constants.SDK_BUILD_TEST_JAVALIB_DIR, | 177 _SDK_OUT_DIR, options.build_type, constants.SDK_BUILD_TEST_JAVALIB_DIR, |
178 '%s.jar' % options.test_apk) | 178 '%s.jar' % options.test_apk) |
179 if options.annotation_str: | 179 if options.annotation_str: |
180 options.annotation = options.annotation_str.split() | 180 options.annotation = options.annotation_str.split() |
181 elif options.test_filter: | 181 elif options.test_filter: |
182 options.annotation = [] | 182 options.annotation = [] |
183 else: | 183 else: |
184 options.annotation = ['Smoke', 'SmallTest', 'MediumTest', 'LargeTest'] | 184 options.annotation = ['Smoke', 'SmallTest', 'MediumTest', 'LargeTest'] |
OLD | NEW |