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 cd8617cfc15f7bb84fa79a60caa1a71261dd2de9..d5e6e4df59fb9a8f6a3559bca260f3e3419b91b9 100644 |
--- a/build/android/pylib/instrumentation/instrumentation_test_instance.py |
+++ b/build/android/pylib/instrumentation/instrumentation_test_instance.py |
@@ -464,7 +464,7 @@ class InstrumentationTestInstance(test_instance.TestInstance): |
def GetDataDependencies(self): |
return self._data_deps |
- def GetTests(self): |
+ def _GetAllTests(self): |
pickle_path = '%s-proguard.pickle' % self.test_jar |
try: |
tests = self._GetTestsFromPickle(pickle_path, self.test_jar) |
@@ -472,8 +472,22 @@ class InstrumentationTestInstance(test_instance.TestInstance): |
logging.info('Getting tests from JAR via proguard. (%s)', str(e)) |
tests = self._GetTestsFromProguard(self.test_jar) |
self._SaveTestsToPickle(pickle_path, self.test_jar, tests) |
- return self._ParametrizeTestsWithFlags( |
- self._InflateTests(self._FilterTests(tests))) |
+ return tests |
+ |
+ def TotalTestAmount(self): |
+ total_test_amount = 0 |
+ tests = self._GetAllTests() |
+ for c in tests: |
+ total_test_amount += len(c['methods']) |
+ return total_test_amount |
+ |
+ def GetFilteredTests(self): |
+ tests = self._GetAllTests() |
+ return self._FilterTests(tests) |
+ |
+ def GetTests(self): |
+ filtered_tests = self.GetFilteredTests() |
+ return self._ParametrizeTestsWithFlags(filtered_tests) |
class ProguardPickleException(Exception): |
pass |