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

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

Issue 294113003: [Android] Convert to DeviceUtils versions of WaitUntilFullyBooted and GetExternalStoragePath. (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/utils/parallelizer.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 8eff0b0a24c343a56fa22a288478b490da7f52d8..4d88a45e6523fefbc2f4abf212553ea1339e5f18 100644
--- a/build/android/pylib/utils/test_environment.py
+++ b/build/android/pylib/utils/test_environment.py
@@ -6,7 +6,6 @@ import logging
import psutil
import signal
-from pylib import android_commands
from pylib.device import device_errors
from pylib.device import device_utils
@@ -31,23 +30,17 @@ def _KillWebServers():
logging.warning('Failed waiting for %s to die. %s', p.pid, e)
-
def CleanupLeftoverProcesses():
"""Clean up the test environment, restarting fresh adb and HTTP daemons."""
_KillWebServers()
- did_restart_host_adb = False
- 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:
- device_utils.RestartServer()
- did_restart_host_adb = True
- device.old_interface.RestartAdbdOnDevice()
- 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()
+ device_utils.RestartServer()
+ p = device_utils.DeviceUtils.parallel()
+ p.old_interface.RestartAdbdOnDevice()
+ try:
+ p.EnableRoot()
+ except device_errors.CommandFailedError as e:
+ # TODO(jbudorick) Handle this exception appropriately after interface
+ # conversions are finished.
+ logging.error(str(e))
+ p.WaitUntilFullyBooted()
« no previous file with comments | « build/android/pylib/utils/parallelizer.py ('k') | build/android/pylib/valgrind_tools.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698