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

Unified Diff: build/android/pylib/local/device/local_device_gtest_run.py

Issue 1915273002: Raise exception when devices fail to list tests. (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
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 cb8dc471521d7c7e58fee0918195f2dfa7d2784c..17f182ad63fa0e43c0c397f118bf210b83cfc0f7 100644
--- a/build/android/pylib/local/device/local_device_gtest_run.py
+++ b/build/android/pylib/local/device/local_device_gtest_run.py
@@ -319,9 +319,9 @@ 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)
-
# If all devices failed to list tests, raise an exception.
- if all([tl is None for tl in test_lists]):
+ # Check that tl is not None and is not empty.
+ if all([(tl is None or not tl) for tl in test_lists]):
BigBossZhiling 2016/04/25 20:07:15 But in this case, if a suite indeed has an empty l
jbudorick 2016/04/25 20:11:38 Yeah, I think I'm ok with this in general. However
raise device_errors.CommandFailedError(
'Failed to list tests on any device')
return list(sorted(set().union(*[set(tl) for tl in test_lists if tl])))
« android_webview/native/aw_gl_functor.cc ('K') | « android_webview/native/aw_gl_functor.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698