Chromium Code Reviews| 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 |