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

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

Issue 1853333004: Find disabled tests by creating instrumentation test instances (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
« no previous file with comments | « no previous file | tools/android/find_disabled_tests.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | tools/android/find_disabled_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698