diff options
author | frankf@google.com <frankf@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-14 22:01:07 +0000 |
---|---|---|
committer | frankf@google.com <frankf@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-14 22:01:07 +0000 |
commit | 992b72e83f6b51cb0adda7f0d3ea6f5224b8714e (patch) | |
tree | 2a0165da1b17ed579e379b48a589349a140197ed /build/android/run_tests.py | |
parent | 5948872244a0d95a1e0d3d4ab7dd2209d018648a (diff) | |
download | chromium_src-992b72e83f6b51cb0adda7f0d3ea6f5224b8714e.zip chromium_src-992b72e83f6b51cb0adda7f0d3ea6f5224b8714e.tar.gz chromium_src-992b72e83f6b51cb0adda7f0d3ea6f5224b8714e.tar.bz2 |
Partial revert of crrev.com/172937.
Add back the logic of dropping devices of we fail
to get gtest lists.
BUG=
Review URL: https://codereview.chromium.org/11573038
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173217 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/android/run_tests.py')
-rwxr-xr-x | build/android/run_tests.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/build/android/run_tests.py b/build/android/run_tests.py index 912fda6..f7459dd 100755 --- a/build/android/run_tests.py +++ b/build/android/run_tests.py @@ -189,21 +189,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) |