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

Unified Diff: build/android/pylib/utils/test_options_parser.py

Issue 14704006: Add option to exclude specific annotated Android instrumentation tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Yet another typo fixed Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/pylib/instrumentation/test_jar.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b00cfb09b0e950a828ed8e77618eddfd6c6d8c32..f1177ed1bf94429fae0507e8989ade92182be998 100644
--- a/build/android/pylib/utils/test_options_parser.py
+++ b/build/android/pylib/utils/test_options_parser.py
@@ -144,6 +144,10 @@ def AddCommonInstrumentationOptions(option_parser):
'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(
+ '-E', '--exclude-annotation', dest='exclude_annotation_str',
+ help=('Comma-separated list of annotations. Exclude tests with these '
+ 'annotations.'))
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',
@@ -236,6 +240,11 @@ def ValidateCommonInstrumentationOptions(option_parser, options, args):
else:
options.annotations = ['Smoke', 'SmallTest', 'MediumTest', 'LargeTest']
+ if options.exclude_annotation_str:
+ options.exclude_annotations = options.exclude_annotation_str.split(',')
+ else:
+ options.exclude_annotations = []
+
def ValidateInstrumentationOptions(option_parser, options, args):
"""Validate options/arguments and populate options with defaults."""
« no previous file with comments | « build/android/pylib/instrumentation/test_jar.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698