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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 230 def SpawnLogcatMonitor(): | 230 def SpawnLogcatMonitor(): |
| 231 shutil.rmtree(LOGCAT_DIR, ignore_errors=True) | 231 shutil.rmtree(LOGCAT_DIR, ignore_errors=True) |
| 232 bb_utils.SpawnCmd([ | 232 bb_utils.SpawnCmd([ |
| 233 os.path.join(CHROME_SRC, 'build', 'android', 'adb_logcat_monitor.py'), | 233 os.path.join(CHROME_SRC, 'build', 'android', 'adb_logcat_monitor.py'), |
| 234 LOGCAT_DIR]) | 234 LOGCAT_DIR]) |
| 235 | 235 |
| 236 # Wait for logcat_monitor to pull existing logcat | 236 # Wait for logcat_monitor to pull existing logcat |
| 237 RunCmd(['sleep', '5']) | 237 RunCmd(['sleep', '5']) |
| 238 | 238 |
| 239 def ProvisionDevices(options): | 239 def ProvisionDevices(options): |
| 240 bb_annotations.PrintNamedStep('provision_devices') | |
| 241 | |
| 240 # Restart adb to work around bugs, sleep to wait for usb discovery. | 242 # Restart adb to work around bugs, sleep to wait for usb discovery. |
| 241 RunCmd(['adb', 'kill-server']) | 243 RunCmd(['adb', 'kill-server']) |
| 242 RunCmd(['adb', 'start-server']) | 244 RunCmd(['taskset', '-c', '0', 'adb', 'start-server']) |
| 243 RunCmd(['sleep', '1']) | 245 RunCmd(['sleep', '1']) |
|
frankf
2013/08/14 17:03:01
All interactions with adb should go through androi
bulach
2013/08/14 17:56:24
hmm... I think this just emits the commands, it do
frankf
2013/08/14 18:05:44
I'm not following. RunCmd here just runs that exac
bulach
2013/08/14 18:09:59
ahn, you're right! my confusion, I thought this wo
| |
| 244 | 246 |
| 245 bb_annotations.PrintNamedStep('provision_devices') | |
| 246 if options.reboot: | 247 if options.reboot: |
| 247 RebootDevices() | 248 RebootDevices() |
| 248 provision_cmd = ['build/android/provision_devices.py', '-t', options.target] | 249 provision_cmd = ['build/android/provision_devices.py', '-t', options.target] |
| 249 if options.auto_reconnect: | 250 if options.auto_reconnect: |
| 250 provision_cmd.append('--auto-reconnect') | 251 provision_cmd.append('--auto-reconnect') |
| 251 RunCmd(provision_cmd) | 252 RunCmd(provision_cmd) |
| 252 | 253 |
| 253 | 254 |
| 254 def DeviceStatusCheck(_): | 255 def DeviceStatusCheck(_): |
| 255 bb_annotations.PrintNamedStep('device_status_check') | 256 bb_annotations.PrintNamedStep('device_status_check') |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 378 if unknown_tests: | 379 if unknown_tests: |
| 379 return sys.exit('Unknown tests %s' % list(unknown_tests)) | 380 return sys.exit('Unknown tests %s' % list(unknown_tests)) |
| 380 | 381 |
| 381 setattr(options, 'target', options.factory_properties.get('target', 'Debug')) | 382 setattr(options, 'target', options.factory_properties.get('target', 'Debug')) |
| 382 | 383 |
| 383 MainTestWrapper(options) | 384 MainTestWrapper(options) |
| 384 | 385 |
| 385 | 386 |
| 386 if __name__ == '__main__': | 387 if __name__ == '__main__': |
| 387 sys.exit(main(sys.argv)) | 388 sys.exit(main(sys.argv)) |
| OLD | NEW |