diff options
Diffstat (limited to 'automated/lib/android-test-lib')
-rwxr-xr-x | automated/lib/android-test-lib | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/automated/lib/android-test-lib b/automated/lib/android-test-lib index 7330c8b..3bacee6 100755 --- a/automated/lib/android-test-lib +++ b/automated/lib/android-test-lib @@ -161,3 +161,23 @@ adb_shell_which() { return 1 fi } + +parse_common_args() { + while getopts ":s:t:" opt; do + case "${opt}" in + # Specify device serial number when more than one device connected. + s) + ANDROID_SERIAL="${OPTARG}" + ;; + # Specify timeout in seconds for wait_boot_completed. + t) + BOOT_TIMEOUT="${OPTARG}" + export BOOT_TIMEOUT + ;; + *) + echo "Usage: $0 [-s <android_serial>] [-t <boot_timeout>]" 1>&2 + exit 1 + ;; + esac + done +} |