Index: build/android/pylib/instrumentation/test_jar.py |
diff --git a/build/android/pylib/instrumentation/test_jar.py b/build/android/pylib/instrumentation/test_jar.py |
index 964dca7572187f0c52abb0948019a9fee75bdce2..c81258f8aebecf6f8f5846ee8a2c9d0b80169823 100644 |
--- a/build/android/pylib/instrumentation/test_jar.py |
+++ b/build/android/pylib/instrumentation/test_jar.py |
@@ -268,13 +268,14 @@ class TestJar(object): |
'%s has no annotations. Assuming "%s".', test, |
self._DEFAULT_ANNOTATION) |
available_tests.append(test) |
- if exclude_annotation_list: |
- excluded_tests = self.GetAnnotatedTests(exclude_annotation_list) |
- available_tests = list(set(available_tests) - set(excluded_tests)) |
else: |
available_tests = [m for m in self.GetTestMethods() |
if not self.IsHostDrivenTest(m)] |
+ if exclude_annotation_list: |
+ excluded_tests = self.GetAnnotatedTests(exclude_annotation_list) |
+ available_tests = list(set(available_tests) - set(excluded_tests)) |
+ |
tests = [] |
if test_filter: |
# |available_tests| are in adb instrument format: package.path.class#test. |