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 64dea2c0007b7ebdf94368a56199b7523e6ed54c..e582a1d752d2750480646b2889c1444cb86ded0c 100644 |
--- a/build/android/pylib/instrumentation/test_jar.py |
+++ b/build/android/pylib/instrumentation/test_jar.py |
@@ -197,8 +197,9 @@ class TestJar(object): |
'%s has no annotations. Assuming "%s".', test, |
self._DEFAULT_ANNOTATION) |
available_tests.append(test) |
- excluded_tests = self.GetAnnotatedTests(exclude_annotation_list) |
- available_tests = list(set(available_tests) - set(excluded_tests)) |
+ 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.IsPythonDrivenTest(m)] |