Index: build/android/pylib/utils/test_options_parser.py |
diff --git a/build/android/pylib/utils/test_options_parser.py b/build/android/pylib/utils/test_options_parser.py |
index 98e5c1521d35376b6e98393fcff3e6dc8f306f0a..4ddc32f001ac2888d0ff54be3bcb0cb573634024 100644 |
--- a/build/android/pylib/utils/test_options_parser.py |
+++ b/build/android/pylib/utils/test_options_parser.py |
@@ -134,26 +134,19 @@ def AddCommonInstrumentationOptions(option_parser): |
"""Decorates OptionParser with base instrumentation tests options.""" |
AddTestRunnerOptions(option_parser) |
- option_parser.add_option('-w', '--wait_debugger', dest='wait_for_debugger', |
- action='store_true', help='Wait for debugger.') |
option_parser.add_option('-f', '--test_filter', |
help='Test filter (if not fully qualified, ' |
'will run all matches).') |
- option_parser.add_option('-A', '--annotation', dest='annotation_str', |
- help=('Run only tests with any of the given ' |
- 'annotations. ' |
- 'An annotation can be either a key or a ' |
- 'key-values pair. ' |
- 'A test that has no annotation is ' |
- 'considered "SmallTest".')) |
+ option_parser.add_option( |
+ '-A', '--annotation', dest='annotation_str', |
+ help=('Comma-separated list of annotations. Run only tests with any of ' |
+ 'the given annotations. An annotation can be either a key or a ' |
+ 'key-values pair. A test that has no annotation is considered ' |
+ '"SmallTest".')) |
option_parser.add_option('-j', '--java_only', action='store_true', |
help='Run only the Java tests.') |
option_parser.add_option('-p', '--python_only', action='store_true', |
help='Run only the Python tests.') |
- option_parser.add_option('-n', '--run_count', type='int', |
- dest='number_of_runs', default=1, |
- help=('How many times to run each test, regardless ' |
- 'of the result. (Default is 1)')) |
option_parser.add_option('--screenshot', dest='screenshot_failures', |
action='store_true', |
help='Capture screenshots of test failures') |
@@ -194,6 +187,8 @@ def AddInstrumentationOptions(option_parser): |
"""Decorates OptionParser with instrumentation tests options.""" |
AddCommonInstrumentationOptions(option_parser) |
+ option_parser.add_option('-w', '--wait_debugger', dest='wait_for_debugger', |
+ action='store_true', help='Wait for debugger.') |
option_parser.add_option('-I', dest='install_apk', |
help='Install APK.', action='store_true') |
option_parser.add_option( |
@@ -234,11 +229,11 @@ def ValidateCommonInstrumentationOptions(option_parser, options, args): |
options.run_java_tests = False |
if options.annotation_str: |
- options.annotation = options.annotation_str.split() |
+ options.annotations = options.annotation_str.split(',') |
elif options.test_filter: |
- options.annotation = [] |
+ options.annotations = [] |
else: |
- options.annotation = ['Smoke', 'SmallTest', 'MediumTest', 'LargeTest'] |
+ options.annotations = ['Smoke', 'SmallTest', 'MediumTest', 'LargeTest'] |
def ValidateInstrumentationOptions(option_parser, options, args): |