Commit e3b2f507 authored by navabi's avatar navabi Committed by Commit bot

Use -s to pass string date to 'adb shell date' command to set date in provision.

The 'date -u' was not working on N5 devices. The -s option seems to work across
devices. I've tested on N4 and N5.

BUG=406848

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

Cr-Commit-Position: refs/heads/master@{#300542}
parent 3f44910d
...@@ -190,7 +190,8 @@ def ProvisionDevice(device, options, is_perf): ...@@ -190,7 +190,8 @@ def ProvisionDevice(device, options, is_perf):
battery_info.get('level', 0)) battery_info.get('level', 0))
time.sleep(60) time.sleep(60)
battery_info = device.old_interface.GetBatteryInfo() battery_info = device.old_interface.GetBatteryInfo()
device.RunShellCommand('date -u %f' % time.time(), as_root=True) device.RunShellCommand('date -s %s' % time.strftime('%Y%m%d.%l%M%S'),
as_root=True)
# TODO(jbudorick): Tune the timeout per OS version. # TODO(jbudorick): Tune the timeout per OS version.
device.Reboot(True, timeout=600, retries=0) device.Reboot(True, timeout=600, retries=0)
props = device.RunShellCommand('getprop') props = device.RunShellCommand('getprop')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment