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

Unified Diff: build/android/pylib/instrumentation/test_jar.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/dispatch.py ('k') | build/android/pylib/utils/test_options_parser.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/instrumentation/test_jar.py
diff --git a/build/android/pylib/instrumentation/test_jar.py b/build/android/pylib/instrumentation/test_jar.py
index e116a1bdc6d9db3cbcfaaf7e246b6be240986d4d..64dea2c0007b7ebdf94368a56199b7523e6ed54c 100644
--- a/build/android/pylib/instrumentation/test_jar.py
+++ b/build/android/pylib/instrumentation/test_jar.py
@@ -173,13 +173,16 @@ class TestJar(object):
tests_missing_annotations.append(test_method)
return sorted(tests_missing_annotations)
- def _GetAllMatchingTests(self, annotation_filter_list, test_filter):
+ def _GetAllMatchingTests(self, annotation_filter_list,
+ exclude_annotation_list, test_filter):
"""Get a list of tests matching any of the annotations and the filter.
Args:
annotation_filter_list: List of test annotations. A test must have at
- least one of the these annotations. A test without any annotations
- is considered to be SmallTest.
+ least one of these annotations. A test without any annotations is
+ considered to be SmallTest.
+ exclude_annotation_list: List of test annotations. A test must not have
+ any of these annotations.
test_filter: Filter used for partial matching on the test method names.
Returns:
@@ -194,6 +197,8 @@ class TestJar(object):
'%s has no annotations. Assuming "%s".', test,
self._DEFAULT_ANNOTATION)
available_tests.append(test)
+ excluded_tests = self.GetAnnotatedTests(exclude_annotation_list)
+ available_tests = list(set(available_tests) - set(excluded_tests))
else:
available_tests = [m for m in self.GetTestMethods()
if not self.IsPythonDrivenTest(m)]
« no previous file with comments | « build/android/pylib/instrumentation/dispatch.py ('k') | build/android/pylib/utils/test_options_parser.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698