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

Unified Diff: build/android/pylib/instrumentation/test_runner.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 | « build/android/pylib/base/test_dispatcher.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/instrumentation/test_runner.py
diff --git a/build/android/pylib/instrumentation/test_runner.py b/build/android/pylib/instrumentation/test_runner.py
index b37629a35a9aeb7c5e6d5d32225a7991c376fa69..3be22a1338a588020e76f4fcb12a24cfac9664a5 100644
--- a/build/android/pylib/instrumentation/test_runner.py
+++ b/build/android/pylib/instrumentation/test_runner.py
@@ -329,7 +329,10 @@ class TestRunner(base_test_runner.BaseTestRunner):
return self.device.old_interface.RunInstrumentationTest(
test, self.test_pkg.GetPackageName(),
self._GetInstrumentationArgs(), timeout)
- except adb_wrapper.CommandTimeoutError:
+ except (adb_wrapper.CommandTimeoutError,
+ # TODO(jbudorick) Remove this once the underlying implementations
+ # for the above are switched or wrapped.
+ android_commands.errors.WaitForResponseTimedOutError):
logging.info('Ran the test with timeout of %ds.' % timeout)
raise
@@ -368,8 +371,10 @@ class TestRunner(base_test_runner.BaseTestRunner):
# See ../../third_party/android/testrunner/adb_interface.py
except (adb_wrapper.CommandTimeoutError,
adb_wrapper.DeviceUnreachableError,
- # TODO(jbudorick) Remove this once the underlying implementations
+ # TODO(jbudorick) Remove these once the underlying implementations
# for the above are switched or wrapped.
+ android_commands.errors.WaitForResponseTimedOutError,
+ android_commands.errors.DeviceUnresponsiveError,
android_commands.errors.InstrumentationError), e:
if start_date_ms:
duration_ms = int(time.time()) * 1000 - start_date_ms
« no previous file with comments | « build/android/pylib/base/test_dispatcher.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698