Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 import collections | 6 import collections |
| 7 import glob | 7 import glob |
| 8 import multiprocessing | 8 import multiprocessing |
| 9 import os | 9 import os |
| 10 import shutil | 10 import shutil |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 244 | 244 |
| 245 def ProvisionDevices(options): | 245 def ProvisionDevices(options): |
| 246 # Restart adb to work around bugs, sleep to wait for usb discovery. | 246 # Restart adb to work around bugs, sleep to wait for usb discovery. |
| 247 RunCmd(['adb', 'kill-server']) | 247 RunCmd(['adb', 'kill-server']) |
| 248 RunCmd(['adb', 'start-server']) | 248 RunCmd(['adb', 'start-server']) |
| 249 RunCmd(['sleep', '1']) | 249 RunCmd(['sleep', '1']) |
| 250 | 250 |
| 251 buildbot_report.PrintNamedStep('provision_devices') | 251 buildbot_report.PrintNamedStep('provision_devices') |
| 252 if options.reboot: | 252 if options.reboot: |
| 253 RebootDevices() | 253 RebootDevices() |
| 254 RunCmd(['build/android/provision_devices.py', '-t', options.target]) | 254 if options.auto_reconnect: |
|
Isaac (away)
2013/07/04 01:57:04
provision_cmd = [...]
if options.auto_reconnect:
navabi1
2013/07/08 17:17:27
Done.
| |
| 255 RunCmd(['build/android/provision_devices.py', '-t', options.target, | |
| 256 '--auto-reconnect']) | |
| 257 else: | |
| 258 RunCmd(['build/android/provision_devices.py', '-t', options.target]) | |
| 255 | 259 |
| 256 | 260 |
| 257 def DeviceStatusCheck(_): | 261 def DeviceStatusCheck(_): |
| 258 buildbot_report.PrintNamedStep('device_status_check') | 262 buildbot_report.PrintNamedStep('device_status_check') |
| 259 RunCmd(['build/android/device_status_check.py'], halt_on_failure=True) | 263 RunCmd(['build/android/device_status_check.py'], halt_on_failure=True) |
| 260 | 264 |
| 261 | 265 |
| 262 def GetDeviceSetupStepCmds(): | 266 def GetDeviceSetupStepCmds(): |
| 263 return [ | 267 return [ |
| 264 ('provision_devices', ProvisionDevices), | 268 ('provision_devices', ProvisionDevices), |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 376 if unknown_tests: | 380 if unknown_tests: |
| 377 return sys.exit('Unknown tests %s' % list(unknown_tests)) | 381 return sys.exit('Unknown tests %s' % list(unknown_tests)) |
| 378 | 382 |
| 379 setattr(options, 'target', options.factory_properties.get('target', 'Debug')) | 383 setattr(options, 'target', options.factory_properties.get('target', 'Debug')) |
| 380 | 384 |
| 381 MainTestWrapper(options) | 385 MainTestWrapper(options) |
| 382 | 386 |
| 383 | 387 |
| 384 if __name__ == '__main__': | 388 if __name__ == '__main__': |
| 385 sys.exit(main(sys.argv)) | 389 sys.exit(main(sys.argv)) |
| OLD | NEW |