diff options
Diffstat (limited to 'tools/buildbot-setup-device.sh')
-rwxr-xr-x | tools/buildbot-setup-device.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/buildbot-setup-device.sh b/tools/buildbot-setup-device.sh index 1cad3e3793..decb24735a 100755 --- a/tools/buildbot-setup-device.sh +++ b/tools/buildbot-setup-device.sh @@ -36,7 +36,11 @@ msginfo "Date on device" adb shell date host_seconds_since_epoch=$(date -u +%s) -device_seconds_since_epoch=$(adb shell date -u +%s) + +# Get the device time in seconds, but filter the output as some +# devices emit CRLF at the end of the command which then breaks the +# time comparisons in this script (Hammerhead, MRA59G 2457013). +device_seconds_since_epoch=$(adb shell date -u +%s | tr -c -d '[:digit:]') abs_time_difference_in_seconds=$(expr $host_seconds_since_epoch - $device_seconds_since_epoch) if [ $abs_time_difference_in_seconds -lt 0 ]; then |