Chromium Code Reviews| 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..e29fdbe89b45f80d35864e1b43da4023aea4d4e0 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(None) |
|
craigdh
2014/05/22 17:22:05
the explicit passing of None here is a bit odd. I
jbudorick
2014/05/22 19:26:40
Switched to calling without parameters + added sup
|
| + 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() |