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

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

Issue 250343002: [Android] Restore old exception types alongside new ones. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | build/android/pylib/instrumentation/test_runner.py » ('j') | 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 b3642e23077542052c8d6ebb038d127f1e9fd932..98c50a34da4c9e32d235dcd0a1cab5dd1daa165e 100644
--- a/build/android/pylib/base/test_dispatcher.py
+++ b/build/android/pylib/base/test_dispatcher.py
@@ -217,7 +217,10 @@ def _SetUp(runner_factory, device, out_runners, threadsafe_counter):
runner = runner_factory(device, index)
runner.SetUp()
out_runners.append(runner)
- except adb_wrapper.DeviceUnreachableError as e:
+ except (adb_wrapper.DeviceUnreachableError,
+ # TODO(jbudorick) Remove this once the underlying implementations
+ # for the above are switched or wrapped.
+ android_commands.errors.DeviceUnresponsiveError) as e:
logging.warning('Failed to create shard for %s: [%s]', device, e)
@@ -259,7 +262,10 @@ def _RunAllTests(runners, test_collection_factory, num_retries, timeout=None,
# Catch DeviceUnreachableErrors and set a warning exit code
try:
workers.JoinAll(watcher)
- except adb_wrapper.DeviceUnreachableError as e:
+ except (adb_wrapper.DeviceUnreachableError,
+ # TODO(jbudorick) Remove this once the underlying implementations
+ # for the above are switched or wrapped.
+ android_commands.errors.DeviceUnresponsiveError) as e:
logging.error(e)
exit_code = constants.WARNING_EXIT_CODE
@@ -365,5 +371,8 @@ def RunTests(tests, runner_factory, devices, shard=True,
finally:
try:
_TearDownRunners(runners, setup_timeout)
- except adb_wrapper.DeviceUnreachableError as e:
+ except (adb_wrapper.DeviceUnreachableError,
+ # TODO(jbudorick) Remove this once the underlying implementations
+ # for the above are switched or wrapped.
+ android_commands.errors.DeviceUnresponsiveError) as e:
logging.warning('Device unresponsive during TearDown: [%s]', e)
« no previous file with comments | « no previous file | build/android/pylib/instrumentation/test_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698