Index: build/android/pylib/host_driven/test_info_collection.py |
diff --git a/build/android/pylib/host_driven/test_info_collection.py b/build/android/pylib/host_driven/test_info_collection.py |
index 5a7d467b2607659c1e4f1e2ce17c1140ad07ced7..cc0ab13f6f4ff4521ca73a39f3d3961cd5be9fd5 100644 |
--- a/build/android/pylib/host_driven/test_info_collection.py |
+++ b/build/android/pylib/host_driven/test_info_collection.py |
@@ -93,9 +93,10 @@ class TestInfoCollection(object): |
'Assuming "SmallTest":\n%s', |
'\n'.join(test_names)) |
available_tests += tests_without_annotation |
- excluded_tests = [t for t in available_tests if |
- self._AnnotationIncludesTest(t, exclude_annotations)] |
- available_tests = list(set(available_tests) - set(excluded_tests)) |
+ if exclude_annotations: |
+ excluded_tests = [t for t in available_tests if |
+ self._AnnotationIncludesTest(t, exclude_annotations)] |
+ available_tests = list(set(available_tests) - set(excluded_tests)) |
available_tests = [t for t in available_tests if |
self._NameFilterIncludesTest(t, name_filter)] |