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

Unified Diff: build/android/pylib/instrumentation/instrumentation_test_instance.py

Issue 1924893002: 👓 Allow instrumentation test filters to use fully-qualified class names (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review suggestion Created 4 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/instrumentation/instrumentation_test_instance.py
diff --git a/build/android/pylib/instrumentation/instrumentation_test_instance.py b/build/android/pylib/instrumentation/instrumentation_test_instance.py
index 9f1e439ca0b1bfd4fd3209857719044ceab423c9..f0b7cab24868cce3943d33e82e639bdad6e46438 100644
--- a/build/android/pylib/instrumentation/instrumentation_test_instance.py
+++ b/build/android/pylib/instrumentation/instrumentation_test_instance.py
@@ -546,9 +546,12 @@ class InstrumentationTestInstance(test_instance.TestInstance):
def _FilterTests(self, tests):
def gtest_filter(c, m):
- t = ['%s.%s' % (c['class'].split('.')[-1], m['method'])]
- return (not self._test_filter
- or unittest_util.FilterTestNames(t, self._test_filter))
+ if not self._test_filter:
+ return True
+ # Allow fully-qualified name as well as an omitted package.
+ names = ['%s.%s' % (c['class'], m['method']),
+ '%s.%s' % (c['class'].split('.')[-1], m['method'])]
+ return unittest_util.FilterTestNames(names, self._test_filter)
def annotation_filter(all_annotations):
if not self._annotations:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698