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

Unified Diff: build/android/pylib/utils/test_environment.py

Issue 285143002: [Android] Convert to DeviceUtils versions of IsOnline, HasRoot, and EnableRoot. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 7 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/instrumentation/test_runner.py ('k') | build/android/pylib/valgrind_tools.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/utils/test_environment.py
diff --git a/build/android/pylib/utils/test_environment.py b/build/android/pylib/utils/test_environment.py
index 145e07c85efa4a4674f2b3acf23972cb15f628c1..8eff0b0a24c343a56fa22a288478b490da7f52d8 100644
--- a/build/android/pylib/utils/test_environment.py
+++ b/build/android/pylib/utils/test_environment.py
@@ -7,8 +7,10 @@ import psutil
import signal
from pylib import android_commands
+from pylib.device import device_errors
from pylib.device import device_utils
+
def _KillWebServers():
for s in [signal.SIGTERM, signal.SIGINT, signal.SIGQUIT, signal.SIGKILL]:
signalled = []
@@ -41,6 +43,11 @@ def CleanupLeftoverProcesses():
device_utils.RestartServer()
did_restart_host_adb = True
device.old_interface.RestartAdbdOnDevice()
- device.old_interface.EnableAdbRoot()
+ try:
+ device.EnableRoot()
+ except device_errors.CommandFailedError as e:
+ # TODO(jbudorick) Handle this exception appropriately after interface
+ # conversions are finished.
+ logging.error(str(e))
device.old_interface.WaitForDevicePm()
« no previous file with comments | « build/android/pylib/instrumentation/test_runner.py ('k') | build/android/pylib/valgrind_tools.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698