diff options
author | Maxim Siniavine <siniavine@google.com> | 2013-11-11 16:08:17 -0800 |
---|---|---|
committer | Maxim Siniavine <siniavine@google.com> | 2013-11-11 16:08:17 -0800 |
commit | eba0081f35f5f58cc2bc696c1d58b97507c38143 (patch) | |
tree | d86cd0a1a058026ef70ab3a9b3777d9c7141bc04 | |
parent | e56eec3dd5c1b5931ecc54d6aa954f1d8a3f53fa (diff) | |
download | testing-kitkat-mr1.1-release.tar.gz |
Fix argument parsing in uiautomator shell script.android-4.4.2_r2.0.1android-4.4.2_r2android-4.4.2_r1.0.1android-4.4.2_r1android-4.4.1_r1.0.1android-4.4.1_r1kitkat-mr1.1-releasekitkat-mr1-releaseidea133-weekly-releaseidea133
When only jar files were provided as arguments to runtest command
the script would display a help message rather than running the test.
BUG: 11634975
Change-Id: I3ce9060ffbdcc9a7e39bbd04de491eb9f0cbfc9f
-rwxr-xr-x | uiautomator/cmds/uiautomator/uiautomator | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/uiautomator/cmds/uiautomator/uiautomator b/uiautomator/cmds/uiautomator/uiautomator index 9aec2c4..fe2c735 100755 --- a/uiautomator/cmds/uiautomator/uiautomator +++ b/uiautomator/cmds/uiautomator/uiautomator @@ -69,11 +69,14 @@ jars= if [ "${cmd}" == "runtest" ]; then # first parse the jar paths while [ true ]; do - if [ -z "${1}" ]; then + if [ -z "${1}" ] && [ -z "${jars}" ]; then echo "Error: more parameters expected for runtest; please see usage for details" cmd="help" break fi + if [ -z "${1}" ]; then + break + fi jar=${1} if [ "${1:0:1}" = "-" ]; then # we are done with jars, starting with parameters now |