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 hashlib | 8 import hashlib |
9 import json | 9 import json |
10 import os | 10 import os |
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 def ProvisionDevices(options): | 405 def ProvisionDevices(options): |
406 bb_annotations.PrintNamedStep('provision_devices') | 406 bb_annotations.PrintNamedStep('provision_devices') |
407 | 407 |
408 if not bb_utils.TESTING: | 408 if not bb_utils.TESTING: |
409 # Restart adb to work around bugs, sleep to wait for usb discovery. | 409 # Restart adb to work around bugs, sleep to wait for usb discovery. |
410 device_utils.RestartServer() | 410 device_utils.RestartServer() |
411 RunCmd(['sleep', '1']) | 411 RunCmd(['sleep', '1']) |
412 provision_cmd = ['build/android/provision_devices.py', '-t', options.target] | 412 provision_cmd = ['build/android/provision_devices.py', '-t', options.target] |
413 if options.auto_reconnect: | 413 if options.auto_reconnect: |
414 provision_cmd.append('--auto-reconnect') | 414 provision_cmd.append('--auto-reconnect') |
| 415 if options.skip_wipe: |
| 416 provision_cmd.append('--skip-wipe') |
415 RunCmd(provision_cmd) | 417 RunCmd(provision_cmd) |
416 | 418 |
417 | 419 |
418 def DeviceStatusCheck(options): | 420 def DeviceStatusCheck(options): |
419 bb_annotations.PrintNamedStep('device_status_check') | 421 bb_annotations.PrintNamedStep('device_status_check') |
420 cmd = ['build/android/buildbot/bb_device_status_check.py'] | 422 cmd = ['build/android/buildbot/bb_device_status_check.py'] |
421 if options.restart_usb: | 423 if options.restart_usb: |
422 cmd.append('--restart-usb') | 424 cmd.append('--restart-usb') |
423 RunCmd(cmd, halt_on_failure=True) | 425 RunCmd(cmd, halt_on_failure=True) |
424 | 426 |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
640 'only run if this is set.')) | 642 'only run if this is set.')) |
641 parser.add_option('--restart-usb', action='store_true', | 643 parser.add_option('--restart-usb', action='store_true', |
642 help='Restart usb ports before device status check.') | 644 help='Restart usb ports before device status check.') |
643 parser.add_option( | 645 parser.add_option( |
644 '--flakiness-server', | 646 '--flakiness-server', |
645 help=('The flakiness dashboard server to which the results should be ' | 647 help=('The flakiness dashboard server to which the results should be ' |
646 'uploaded.')) | 648 'uploaded.')) |
647 parser.add_option( | 649 parser.add_option( |
648 '--auto-reconnect', action='store_true', | 650 '--auto-reconnect', action='store_true', |
649 help='Push script to device which restarts adbd on disconnections.') | 651 help='Push script to device which restarts adbd on disconnections.') |
| 652 parser.add_option('--skip-wipe', action='store_true', |
| 653 help='Do not wipe devices during provisioning.') |
650 parser.add_option( | 654 parser.add_option( |
651 '--logcat-dump-output', | 655 '--logcat-dump-output', |
652 help='The logcat dump output will be "tee"-ed into this file') | 656 help='The logcat dump output will be "tee"-ed into this file') |
653 # During processing perf bisects, a seperate working directory created under | 657 # During processing perf bisects, a seperate working directory created under |
654 # which builds are produced. Therefore we should look for relevent output | 658 # which builds are produced. Therefore we should look for relevent output |
655 # file under this directory.(/b/build/slave/<slave_name>/build/bisect/src/out) | 659 # file under this directory.(/b/build/slave/<slave_name>/build/bisect/src/out) |
656 parser.add_option( | 660 parser.add_option( |
657 '--chrome-output-dir', | 661 '--chrome-output-dir', |
658 help='Chrome output directory to be used while bisecting.') | 662 help='Chrome output directory to be used while bisecting.') |
659 | 663 |
(...skipping 25 matching lines...) Expand all Loading... |
685 | 689 |
686 if options.coverage_bucket: | 690 if options.coverage_bucket: |
687 setattr(options, 'coverage_dir', | 691 setattr(options, 'coverage_dir', |
688 os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) | 692 os.path.join(CHROME_OUT_DIR, options.target, 'coverage')) |
689 | 693 |
690 MainTestWrapper(options) | 694 MainTestWrapper(options) |
691 | 695 |
692 | 696 |
693 if __name__ == '__main__': | 697 if __name__ == '__main__': |
694 sys.exit(main(sys.argv)) | 698 sys.exit(main(sys.argv)) |
OLD | NEW |