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

Side by Side Diff: platform_tools/android/bin/adb_wait_for_device

Issue 1832883002: Skip toolchain downloads for a few android tools (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Address comment Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 # 2 #
3 # Wait for the device to be ready to run tests. 3 # Wait for the device to be ready to run tests.
4 4
5 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 5 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
6 SKIP_TOOLCHAIN_SETUP="true"
6 source $SCRIPT_DIR/android_setup.sh 7 source $SCRIPT_DIR/android_setup.sh
7 source $SCRIPT_DIR/utils/setup_adb.sh 8 source $SCRIPT_DIR/utils/setup_adb.sh
8 9
9 # Helper function used by get_battery_level. Parses the battery level from 10 # Helper function used by get_battery_level. Parses the battery level from
10 # dumpsys output. 11 # dumpsys output.
11 function _parse_battery_level { 12 function _parse_battery_level {
12 SPLIT=( $@ ) 13 SPLIT=( $@ )
13 14
14 HAS_BATTERY=1 15 HAS_BATTERY=1
15 LEVEL="" 16 LEVEL=""
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 # Wait for battery charge. 75 # Wait for battery charge.
75 DESIRED_BATTERY_LEVEL=80 76 DESIRED_BATTERY_LEVEL=80
76 CURRENT_BATTERY_LEVEL="$(get_battery_level)" 77 CURRENT_BATTERY_LEVEL="$(get_battery_level)"
77 while [ "${CURRENT_BATTERY_LEVEL}" -lt "${DESIRED_BATTERY_LEVEL}" ]; do 78 while [ "${CURRENT_BATTERY_LEVEL}" -lt "${DESIRED_BATTERY_LEVEL}" ]; do
78 echo "Battery level is ${CURRENT_BATTERY_LEVEL}; waiting to charge to ${DESIRE D_BATTERY_LEVEL}" 79 echo "Battery level is ${CURRENT_BATTERY_LEVEL}; waiting to charge to ${DESIRE D_BATTERY_LEVEL}"
79 sleep 5 80 sleep 5
80 CURRENT_BATTERY_LEVEL="$(get_battery_level)" 81 CURRENT_BATTERY_LEVEL="$(get_battery_level)"
81 done 82 done
82 83
83 echo "Ready!" 84 echo "Ready!"
OLDNEW
« no previous file with comments | « platform_tools/android/bin/adb_push_if_needed ('k') | platform_tools/android/bin/android_kill_skia » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698