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

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

Issue 1945913002: Revert of 🎯 Fail if an instrumentation test is missing size annotation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
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 610f084ba054b787488f49cc00ef860143db3396..f0b7cab24868cce3943d33e82e639bdad6e46438 100644
--- a/build/android/pylib/instrumentation/instrumentation_test_instance.py
+++ b/build/android/pylib/instrumentation/instrumentation_test_instance.py
@@ -33,8 +33,6 @@
'EnormousTest', 'IntegrationTest']
_EXCLUDE_UNLESS_REQUESTED_ANNOTATIONS = [
'DisabledTest', 'FlakyTest']
-_VALID_ANNOTATIONS = set(['Manual', 'PerfTest'] + _DEFAULT_ANNOTATIONS +
- _EXCLUDE_UNLESS_REQUESTED_ANNOTATIONS)
_EXTRA_DRIVER_TEST_LIST = (
'org.chromium.test.driver.OnDeviceInstrumentationDriver.TestList')
_EXTRA_DRIVER_TEST_LIST_FILE = (
@@ -50,13 +48,6 @@
_PARAMETERIZED_TEST_SET_ANNOTATION = 'ParameterizedTest$Set'
_NATIVE_CRASH_RE = re.compile('native crash', re.IGNORECASE)
_PICKLE_FORMAT_VERSION = 10
-
-
-class MissingSizeAnnotationError(Exception):
- def __init__(self, class_name):
- super(MissingSizeAnnotationError, self).__init__(class_name +
- ': Test method is missing required size annotation. Add one of: ' +
- ', '.join('@' + a for a in _VALID_ANNOTATIONS))
# TODO(jbudorick): Make these private class methods of
@@ -588,11 +579,6 @@
all_annotations = dict(c['annotations'])
all_annotations.update(m['annotations'])
-
- # Enforce that all tests declare their size.
- if not any(a in _VALID_ANNOTATIONS for a in all_annotations):
- raise MissingSizeAnnotationError('%s.%s' % (c['class'], m['method']))
-
if (not annotation_filter(all_annotations)
or not excluded_annotation_filter(all_annotations)):
continue

Powered by Google App Engine
This is Rietveld 408576698