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

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

Issue 1292053006: Revert of [Android] Add --blacklist-file as a command-line option. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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/uiautomator/setup.py ('k') | build/android/pylib/utils/test_environment.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/utils/emulator.py
diff --git a/build/android/pylib/utils/emulator.py b/build/android/pylib/utils/emulator.py
index c614d0d3d8100e74e6d85e9b835cf3c880a5ad28..cc07e6139d7f51bcd0f63cad9dccc09cdc2c57db 100644
--- a/build/android/pylib/utils/emulator.py
+++ b/build/android/pylib/utils/emulator.py
@@ -18,7 +18,6 @@
from pylib import cmd_helper
from pylib import constants
from pylib import pexpect
-from pylib.device import adb_wrapper
from pylib.device import device_errors
from pylib.device import device_utils
from pylib.utils import time_profile
@@ -90,16 +89,16 @@
running but a device slot is taken. A little bot trouble and we're out of
room forever.
"""
- emulators = [device_utils.DeviceUtils(a)
- for a in adb_wrapper.AdbWrapper.Devices()
- if a.is_emulator]
+ emulators = [d for d in device_utils.DeviceUtils.HealthyDevices()
+ if d.adb.is_emulator]
if not emulators:
return
for e in emulators:
e.adb.Emu(['kill'])
logging.info('Emulator killing is async; give a few seconds for all to die.')
for _ in range(5):
- if not any(a.is_emulator for a in adb_wrapper.AdbWrapper.Devices()):
+ if not any(d.adb.is_emulator for d
+ in device_utils.DeviceUtils.HealthyDevices()):
return
time.sleep(1)
@@ -143,9 +142,8 @@
def _GetAvailablePort():
"""Returns an available TCP port for the console."""
used_ports = []
- emulators = [device_utils.DeviceUtils(a)
- for a in adb_wrapper.AdbWrapper.Devices()
- if a.is_emulator]
+ emulators = [d for d in device_utils.DeviceUtils.HealthyDevices()
+ if d.adb.is_emulator]
for emulator in emulators:
used_ports.append(emulator.adb.GetDeviceSerial().split('-')[1])
for port in PortPool.port_range():
« no previous file with comments | « build/android/pylib/uiautomator/setup.py ('k') | build/android/pylib/utils/test_environment.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698