Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(544)

Unified Diff: platform_tools/android/bin/adb_wait_for_charge

Issue 1829753004: Splitting up wait_for_device into two pieces (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: platform_tools/android/bin/adb_wait_for_charge
diff --git a/platform_tools/android/bin/adb_wait_for_device b/platform_tools/android/bin/adb_wait_for_charge
similarity index 86%
copy from platform_tools/android/bin/adb_wait_for_device
copy to platform_tools/android/bin/adb_wait_for_charge
index a1f8c1645e1b2053b5370ed3fdf51f5348425a02..43e70bcf69e074ad03a86f290e07bd98c11ec1bb 100755
--- a/platform_tools/android/bin/adb_wait_for_device
+++ b/platform_tools/android/bin/adb_wait_for_charge
@@ -1,6 +1,6 @@
#!/bin/bash
#
-# Wait for the device to be ready to run tests.
+# Wait for the device to be charged enough for testing.
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source $SCRIPT_DIR/android_setup.sh
@@ -63,14 +63,6 @@ function get_battery_level {
echo "0"
}
-set -e
-
-# Wait for the device to be connected and fully booted.
-while [ "$($ADB $DEVICE_SERIAL shell getprop sys.boot_completed | tr -d '\r')" != "1" ]; do
- echo "Waiting for the device to be connected and ready."
- sleep 5
-done
-
# Wait for battery charge.
DESIRED_BATTERY_LEVEL=80
CURRENT_BATTERY_LEVEL="$(get_battery_level)"
@@ -80,4 +72,4 @@ while [ "${CURRENT_BATTERY_LEVEL}" -lt "${DESIRED_BATTERY_LEVEL}" ]; do
CURRENT_BATTERY_LEVEL="$(get_battery_level)"
done
-echo "Ready!"
+echo "Charged!"

Powered by Google App Engine
This is Rietveld 408576698