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

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
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..c61547201fd0cda6c717815401c4347f3d14cf95 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,9 @@ 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:
+ pass
device.old_interface.WaitForDevicePm()

Powered by Google App Engine
This is Rietveld 408576698