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

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

Issue 1222313015: Manual partial update from from https://crrev.com/337502 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 5 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/test_runner.py ('k') | build/android/test_runner.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 635462f208bed21d53165329c1fd02ec4aa54ef2..cc07e6139d7f51bcd0f63cad9dccc09cdc2c57db 100644
--- a/build/android/pylib/utils/emulator.py
+++ b/build/android/pylib/utils/emulator.py
@@ -86,17 +86,19 @@ def _KillAllEmulators():
"""Kill all running emulators that look like ones we started.
There are odd 'sticky' cases where there can be no emulator process
- running but a device slot is taken. A little bot trouble and and
- we're out of room forever.
+ running but a device slot is taken. A little bot trouble and we're out of
+ room forever.
"""
- emulators = [d for d in device_utils.HealthyDevices() if d.adb.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(d.adb.is_emulator for d in device_utils.HealthyDevices()):
+ if not any(d.adb.is_emulator for d
+ in device_utils.DeviceUtils.HealthyDevices()):
return
time.sleep(1)
@@ -140,7 +142,8 @@ class PortPool(object):
def _GetAvailablePort():
"""Returns an available TCP port for the console."""
used_ports = []
- emulators = [d for d in device_utils.HealthyDevices() if d.adb.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/test_runner.py ('k') | build/android/test_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698