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

Unified Diff: build/android/pylib/base/test_dispatcher.py

Issue 1262103002: [Android] Catch device exceptions from individual test shards. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/base/test_dispatcher.py
diff --git a/build/android/pylib/base/test_dispatcher.py b/build/android/pylib/base/test_dispatcher.py
index f91996512865bf2db7393382cb7f25d2510edf57..93df28ccb45ed8dcabd392534c1a31e39bbdd963 100644
--- a/build/android/pylib/base/test_dispatcher.py
+++ b/build/android/pylib/base/test_dispatcher.py
@@ -188,11 +188,14 @@ def _RunAllTests(runners, test_collection_factory, num_retries, timeout=None,
workers = reraiser_thread.ReraiserThreadGroup(threads)
workers.StartAll()
- # Catch DeviceUnreachableErrors and set a warning exit code
try:
workers.JoinAll(watcher)
- except device_errors.DeviceUnreachableError as e:
- logging.error(e)
+ except device_errors.CommandFailedError:
+ logging.exception('Command failed on device.')
+ except device_errors.CommandFailedError:
+ logging.exception('Command timed out on device.')
+ except device_errors.DeviceUnreachableError:
+ logging.exception('Device became unreachable.')
if not all((len(tc) == 0 for tc in test_collections)):
logging.error('Only ran %d tests (all devices are likely offline).' %
« 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