commit | d48e5b8640ebe7af2b29930e3839d1595d62d793 | [log] [tgz] |
---|---|---|
author | benjaminwagner <benjaminwagner@google.com> | Wed Jun 29 07:02:54 2016 -0700 |
committer | Commit bot <commit-bot@chromium.org> | Wed Jun 29 07:02:54 2016 -0700 |
tree | 23c07d46cda839346ee64e98764f2c0e9243c633 | |
parent | 44fbc79e069c28103a44387d11c62e049ef2967d [diff] |
Check for empty output in adb_wait_for_charge. Example error in https://chromium-swarm.appspot.com/user/task/2f96d6439584e411 BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2105813003 Review-Url: https://codereview.chromium.org/2105813003
diff --git a/platform_tools/android/bin/adb_wait_for_charge b/platform_tools/android/bin/adb_wait_for_charge index e24773a..f05c44f 100755 --- a/platform_tools/android/bin/adb_wait_for_charge +++ b/platform_tools/android/bin/adb_wait_for_charge
@@ -54,7 +54,7 @@ STATS="$($ADB $DEVICE_SERIAL shell dumpsys battery)" SPLIT=( $STATS ) RV="$(_parse_battery_level ${SPLIT[@]})" - if [ "$RV" != "-1" ]; then + if [ -n "$RV" ] && [ "$RV" != "-1" ]; then echo "$RV" return fi