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 1d83a96e230172ebfbcb58a60e3ff76c4b433b3b..f020281bb7d751434151ee4f9f9d4c5ddfd4affc 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] |