Index: build/android/pylib/local/device/local_device_gtest_run.py |
diff --git a/build/android/pylib/local/device/local_device_gtest_run.py b/build/android/pylib/local/device/local_device_gtest_run.py |
index e740f564a23cdb8cb8c52aac216b99421a1d977d..5f8dd59542fa3f89236df239ead36585328d44c0 100644 |
--- a/build/android/pylib/local/device/local_device_gtest_run.py |
+++ b/build/android/pylib/local/device/local_device_gtest_run.py |
@@ -315,8 +315,12 @@ class LocalDeviceGtestRun(local_device_test_run.LocalDeviceTestRun): |
# Query all devices in case one fails. |
test_lists = self._env.parallel_devices.pMap(list_tests).pGet(None) |
- # TODO(agrieve): Make this fail rather than return an empty list when |
- # all devices fail. |
+ |
+ # If all devices failed to list_tests, raise an exception. |
mikecase (-- gone --)
2016/02/19 23:41:53
super nit: s/list_tests/list tests
BigBossZhiling
2016/02/24 22:51:14
Done.
|
+ if all([tests == None for tests in test_lists]): |
mikecase (-- gone --)
2016/02/19 23:41:54
super nit: To match the variable naming below...
s
|
+ # Now we know that all devices failed to do list_tests. |
mikecase (-- gone --)
2016/02/19 23:41:53
super nit: Comment is probably unnecessary given y
|
+ raise device_errors.CommandFailedError( |
+ "Failed to list_tests on all devices") |
mikecase (-- gone --)
2016/02/19 23:41:53
super nit: s/list_tests/list tests
super nit: sing
|
return list(sorted(set().union(*[set(tl) for tl in test_lists if tl]))) |
#override |