Do not restart the device if the data was not wiped.

The reboot for the devices was added because after a wipe certain settings
require a reboot to take effect. When the device is not wiped, there is no
reason to reboot it. We need the ability to have bots that will not reboot
devices, because some devices have boot-screen prompt as a security feature.

BUG=

Review URL: https://codereview.chromium.org/737033003

Cr-Original-Commit-Position: refs/heads/master@{#304969}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e52d00fb93f6db33a1d0488b5610cebd96fda82f
This commit is contained in:
navabi 2014-11-19 20:10:36 -08:00 коммит произвёл Commit bot
Родитель 3491dd9a8a
Коммит 598857797d
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -190,8 +190,9 @@ def ProvisionDevice(device, options, is_perf):
battery_info.get('level', 0))
time.sleep(60)
battery_info = device.old_interface.GetBatteryInfo()
# TODO(jbudorick): Tune the timeout per OS version.
device.Reboot(True, timeout=600, retries=0)
if not options.skip_wipe:
# TODO(jbudorick): Tune the timeout per OS version.
device.Reboot(True, timeout=600, retries=0)
device.RunShellCommand('date -s %s' % time.strftime('%Y%m%d.%H%M%S',
time.gmtime()),
as_root=True)