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

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

Issue 221823011: [Android] Change object types from AndroidCommands to DeviceUtils in build/android/. (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/utils/emulator.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 d77219b4df9a7faecb0d65e15608dddff27747cc..b39db084abb4c2ec006de12ae2e0842910d8fa36 100644
--- a/build/android/pylib/utils/test_environment.py
+++ b/build/android/pylib/utils/test_environment.py
@@ -7,7 +7,7 @@ import psutil
import signal
from pylib import android_commands
-
+from pylib.device import device_utils
def _KillWebServers():
for s in [signal.SIGTERM, signal.SIGINT, signal.SIGQUIT, signal.SIGKILL]:
@@ -34,12 +34,13 @@ def CleanupLeftoverProcesses():
"""Clean up the test environment, restarting fresh adb and HTTP daemons."""
_KillWebServers()
did_restart_host_adb = False
- for device in android_commands.GetAttachedDevices():
- adb = android_commands.AndroidCommands(device)
+ for device_serial in android_commands.GetAttachedDevices():
+ device = device_utils.DeviceUtils(device_serial)
# Make sure we restart the host adb server only once.
if not did_restart_host_adb:
- adb.RestartAdbServer()
+ device.old_interface.RestartAdbServer()
did_restart_host_adb = True
- adb.RestartAdbdOnDevice()
- adb.EnableAdbRoot()
- adb.WaitForDevicePm()
+ device.old_interface.RestartAdbdOnDevice()
+ device.old_interface.EnableAdbRoot()
+ device.old_interface.WaitForDevicePm()
+
« no previous file with comments | « build/android/pylib/utils/emulator.py ('k') | build/android/pylib/valgrind_tools.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698