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

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

Issue 2544533006: [Android] Add '--gtest_also_run_disabled_tests' for instrumentation tests (Closed)
Patch Set: Created 4 years 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 | build/android/test_runner.py » ('j') | 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 c2c1f4cb69f771e5b4016a627352391b4c30f7dc..ea0deef720443c4241415f8d713b3d222d6fe0d9 100644
--- a/build/android/pylib/instrumentation/instrumentation_test_instance.py
+++ b/build/android/pylib/instrumentation/instrumentation_test_instance.py
@@ -442,6 +442,8 @@ class InstrumentationTestInstance(test_instance.TestInstance):
self._store_tombstones = False
self._initializeTombstonesAttributes(args)
+ self._run_disabled = False
+
def _initializeApkAttributes(self, args, error_func):
if args.apk_under_test:
apk_under_test_path = args.apk_under_test
@@ -529,6 +531,8 @@ class InstrumentationTestInstance(test_instance.TestInstance):
self._test_filter = _CMDLINE_NAME_SEGMENT_RE.sub(
'', args.test_filter.replace('#', '.'))
+ self._run_disabled = args.run_disabled
+
def annotation_element(a):
a = a.split('=', 1)
return (a[0], a[1] if len(a) == 2 else None)
@@ -549,9 +553,10 @@ class InstrumentationTestInstance(test_instance.TestInstance):
self._excluded_annotations = []
requested_annotations = set(a[0] for a in self._annotations)
- self._excluded_annotations.extend(
- annotation_element(a) for a in _EXCLUDE_UNLESS_REQUESTED_ANNOTATIONS
- if a not in requested_annotations)
+ if not self._run_disabled:
jbudorick 2016/12/02 02:19:35 Without the property, we should be able to use arg
+ self._excluded_annotations.extend(
+ annotation_element(a) for a in _EXCLUDE_UNLESS_REQUESTED_ANNOTATIONS
+ if a not in requested_annotations)
def _initializeFlagAttributes(self, args):
self._flags = ['--enable-test-intents']
@@ -625,6 +630,10 @@ class InstrumentationTestInstance(test_instance.TestInstance):
return self._flags
@property
+ def gtest_also_run_disabled_tests(self):
jbudorick 2016/12/02 02:19:35 If this isn't used, don't add it. We can add it wh
shenghuazhang 2016/12/02 02:25:40 Done.
+ return self._run_disabled
+
+ @property
def package_info(self):
return self._package_info
« no previous file with comments | « no previous file | build/android/test_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698