summaryrefslogtreecommitdiffstats
path: root/build/android/buildbot/bb_device_steps.py
diff options
context:
space:
mode:
Diffstat (limited to 'build/android/buildbot/bb_device_steps.py')
-rwxr-xr-xbuild/android/buildbot/bb_device_steps.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/build/android/buildbot/bb_device_steps.py b/build/android/buildbot/bb_device_steps.py
index 1d83a96..f020281 100755
--- a/build/android/buildbot/bb_device_steps.py
+++ b/build/android/buildbot/bb_device_steps.py
@@ -237,12 +237,14 @@ def SpawnLogcatMonitor():
RunCmd(['sleep', '5'])
def ProvisionDevices(options):
- # Restart adb to work around bugs, sleep to wait for usb discovery.
- RunCmd(['adb', 'kill-server'])
- RunCmd(['adb', 'start-server'])
- RunCmd(['sleep', '1'])
-
bb_annotations.PrintNamedStep('provision_devices')
+
+ if not bb_utils.TESTING:
+ # Restart adb to work around bugs, sleep to wait for usb discovery.
+ adb = android_commands.AndroidCommands()
+ adb.RestartAdbServer()
+ RunCmd(['sleep', '1'])
+
if options.reboot:
RebootDevices()
provision_cmd = ['build/android/provision_devices.py', '-t', options.target]