Index: build/android/provision_devices.py |
diff --git a/build/android/provision_devices.py b/build/android/provision_devices.py |
index d282737f0a177a4a095eddc9bf7973fde1a40b19..192967d73c096e96e2369864e9db3e921b98d42b 100755 |
--- a/build/android/provision_devices.py |
+++ b/build/android/provision_devices.py |
@@ -128,14 +128,6 @@ def ProvisionDevices(options): |
devices = android_commands.GetAttachedDevices() |
for device_serial in devices: |
device = device_utils.DeviceUtils(device_serial) |
- device.old_interface.EnableAdbRoot() |
- WipeDeviceData(device) |
- try: |
- device_utils.DeviceUtils.parallel(devices).old_interface.Reboot(True) |
- except errors.DeviceUnresponsiveError: |
- pass |
- for device_serial in devices: |
- device = device_utils.DeviceUtils(device_serial) |
device.WaitUntilFullyBooted(timeout=90) |
device.old_interface.EnableAdbRoot() |
_ConfigureLocalProperties(device) |
@@ -165,8 +157,8 @@ def main(argv): |
logging.basicConfig(level=logging.INFO) |
parser = optparse.OptionParser() |
- parser.add_option('-w', '--wipe', action='store_true', |
- help='Wipe device data from all attached devices.') |
+ parser.add_option('--skip-wipe', action='store_true', default=False, |
jbudorick
2014/06/12 00:17:17
Do any of the bots use -w or --wipe?
navabi
2014/06/12 00:34:50
No, there shouldn't be. If you look below that was
|
+ help='Don\'t wipe device data during provisioning.') |
dnj
2014/06/12 00:35:46
Just use quotes here; no need to add unnecessary e
navabi
2014/06/12 01:08:59
Done.
|
parser.add_option('-d', '--device', |
help='The serial number of the device to be provisioned') |
parser.add_option('-t', '--target', default='Debug', help='The build target') |
@@ -180,18 +172,20 @@ def main(argv): |
print >> sys.stderr, 'Unused args %s' % args |
return 1 |
- if options.wipe: |
+ if not options.skip_wipe: |
devices = android_commands.GetAttachedDevices() |
dnj
2014/06/12 00:35:46
The old method had an explicit 'wipe' command that
navabi
2014/06/12 01:08:59
Done.
Good catch. The wipe without provisioning s
|
for device_serial in devices: |
device = device_utils.DeviceUtils(device_serial) |
+ device.old_interface.EnableAdbRoot() |
WipeDeviceData(device) |
try: |
- (device_utils.DeviceUtils.parallel(devices) |
- .old_interface.Reboot(True).pFinish(None)) |
+ device_utils.DeviceUtils.parallel(devices).old_interface.Reboot(True) |
dnj
2014/06/12 00:35:46
You should block w/ 'pFinish' like the previous co
jbudorick
2014/06/12 00:51:30
The call to pFinish is vestigial. The call to Rebo
navabi
2014/06/12 01:08:59
Leaving as is.
|
except errors.DeviceUnresponsiveError: |
pass |
- else: |
- ProvisionDevices(options) |
+ for device_serial in devices: |
+ device.WaitUntilFullyBooted(timeout=90) |
dnj
2014/06/12 00:35:46
This 'WaitUntilFullyBooted' will be called twice i
navabi
2014/06/12 01:08:59
Done. It's not expensive, but I removed the one in
|
+ |
+ ProvisionDevices(options) |
if __name__ == '__main__': |