| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # | 2 # |
| 3 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 """Provisions Android devices with settings required for bots. | 7 """Provisions Android devices with settings required for bots. |
| 8 | 8 |
| 9 Usage: | 9 Usage: |
| 10 ./provision_devices.py [-d <device serial number>] | 10 ./provision_devices.py [-d <device serial number>] |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 | 79 |
| 80 def main(argv): | 80 def main(argv): |
| 81 parser = optparse.OptionParser() | 81 parser = optparse.OptionParser() |
| 82 parser.add_option('-d', '--device', | 82 parser.add_option('-d', '--device', |
| 83 help='The serial number of the device to be provisioned') | 83 help='The serial number of the device to be provisioned') |
| 84 parser.add_option('-t', '--target', default='Debug', help='The build target') | 84 parser.add_option('-t', '--target', default='Debug', help='The build target') |
| 85 parser.add_option( | 85 parser.add_option( |
| 86 '-r', '--auto-reconnect', action='store_true', | 86 '-r', '--auto-reconnect', action='store_true', |
| 87 help='Push binary which will reboot the device on adb disconnections.') | 87 help='Push binary which will reboot the device on adb disconnections.') |
| 88 options, args = parser.parse_args(argv[1:]) | 88 options, args = parser.parse_args(argv[1:]) |
| 89 constants.SetBuildType(options.target) |
| 89 | 90 |
| 90 if args: | 91 if args: |
| 91 print >> sys.stderr, 'Unused args %s' % args | 92 print >> sys.stderr, 'Unused args %s' % args |
| 92 return 1 | 93 return 1 |
| 93 | 94 |
| 94 ProvisionDevices(options) | 95 ProvisionDevices(options) |
| 95 | 96 |
| 96 | 97 |
| 97 if __name__ == '__main__': | 98 if __name__ == '__main__': |
| 98 sys.exit(main(sys.argv)) | 99 sys.exit(main(sys.argv)) |
| OLD | NEW |