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

Unified Diff: build/android/run_tests.py

Issue 11573038: Partial revert of crrev.com/172937. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/run_tests.py
diff --git a/build/android/run_tests.py b/build/android/run_tests.py
index ad002828d93fadf7bf6f608dc828f7e5664eb360..2beb7d2e7326a4df980c95532a753360a01d50f7 100755
--- a/build/android/run_tests.py
+++ b/build/android/run_tests.py
@@ -203,21 +203,28 @@ class TestSharder(BaseTestSharder):
self.all_tests = []
if not self.gtest_filter:
# No filter has been specified, let's add all tests then.
- self.all_tests = self._GetAllEnabledTests()
+ self.all_tests, self.attached_devices = self._GetAllEnabledTests()
self.tests = self.all_tests
def _GetAllEnabledTests(self):
- """Returns a list of all enabled tests.
+ """Get all enabled tests and available devices.
Obtains a list of enabled tests from the test package on the device,
then filters it again using the diabled list on the host.
+ Returns:
+ Tuple of (all enabled tests, available devices).
+
Raises Exception if all devices failed.
"""
+ # TODO(frankf): This method is doing too much in a non-systematic way.
+ # If the intention is to drop flaky devices, why not go through all devices
+ # instead of breaking on the first succesfull run?
available_devices = list(self.attached_devices)
while available_devices:
try:
- return self._GetTestsFromDevice(available_devices[-1])
+ return (self._GetTestsFromDevice(available_devices[-1]),
+ available_devices)
except Exception as e:
logging.warning('Failed obtaining tests from %s %s',
available_devices[-1], e)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698