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

Unified Diff: build/android/buildbot/bb_device_steps.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: Address Frank's comments. Created 6 years, 9 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
Index: build/android/buildbot/bb_device_steps.py
diff --git a/build/android/buildbot/bb_device_steps.py b/build/android/buildbot/bb_device_steps.py
index c6e5f268128b24a8b473683e95a5ab05dd204ac4..2c220f34de15484d3c212fd554fe344f67ce595c 100755
--- a/build/android/buildbot/bb_device_steps.py
+++ b/build/android/buildbot/bb_device_steps.py
@@ -21,6 +21,7 @@ sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
import provision_devices
from pylib import android_commands
from pylib import constants
+from pylib.device import device_utils
from pylib.gtest import gtest_config
CHROME_SRC_DIR = bb_utils.CHROME_SRC
@@ -102,7 +103,7 @@ def _GetRevision(options):
def RebootDeviceSafe(device):
"""Reboot a device, wait for it to start, and squelch timeout exceptions."""
try:
- android_commands.AndroidCommands(device).Reboot(True)
+ device_utils.DeviceUtils(device).old_interface.Reboot(True)
except errors.DeviceUnresponsiveError as e:
return e
@@ -113,7 +114,7 @@ def RebootDevices():
# which might not exist in this checkout.
if bb_utils.TESTING:
return
- devices = android_commands.GetAttachedDevices(emulator=False)
+ devices = android_commands.GetAttachedDevices()
print 'Rebooting: %s' % devices
if devices:
pool = multiprocessing.Pool(len(devices))
@@ -398,8 +399,7 @@ def ProvisionDevices(options):
if not bb_utils.TESTING:
# Restart adb to work around bugs, sleep to wait for usb discovery.
- adb = android_commands.AndroidCommands()
- adb.RestartAdbServer()
+ device_utils.DeviceUtils(None).old_interface.RestartAdbServer()
RunCmd(['sleep', '1'])
if not options.no_reboot:

Powered by Google App Engine
This is Rietveld 408576698