diff options
author | joshualitt <joshualitt@chromium.org> | 2015-06-22 05:39:32 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-22 05:39:32 -0700 |
commit | 01f38915e1ed20cb7cc319e2ed6a26cc74db2c16 (patch) | |
tree | d5a54e5394932b1e458f9661bbcd6063fd6a8be8 | |
parent | 78cff136a4b59045e82965cbc9a63bf76a595796 (diff) |
Fixup android launch script to launch VisualBench as well as SampleApp
BUG=skia:
Review URL: https://codereview.chromium.org/1185473003
-rwxr-xr-x | platform_tools/android/bin/android_launch_app | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/platform_tools/android/bin/android_launch_app b/platform_tools/android/bin/android_launch_app index d31e5cb350..53b00e9023 100755 --- a/platform_tools/android/bin/android_launch_app +++ b/platform_tools/android/bin/android_launch_app @@ -12,5 +12,17 @@ if [[ -n $RESOURCE_PATH ]]; then adb_push_if_needed "${SKIA_SRC_DIR}/resources" $RESOURCE_PATH fi -$ADB ${DEVICE_SERIAL} shell am start -S -n "com.skia/.SkiaSampleActivity" --es "cmdLineFlags" "${APP_ARGS[*]}" +app=${APP_ARGS[0]} +if [[ ${app} == '-'* ]]; then + app="SampleApp" + APP_ARGS=( "SampleApp" ${APP_ARGS[*]} ) +fi + +if [[ ${app} == 'SampleApp' ]]; then + $ADB ${DEVICE_SERIAL} shell am start -S -n "com.skia/.SkiaSampleActivity" --es "cmdLineFlags" "${APP_ARGS[*]:1}" +elif [[ ${app} == "VisualBench" ]] ; then + $ADB ${DEVICE_SERIAL} shell am start -S -n "com.skia/.VisualBenchActivity" --es "cmdLineFlags" "${APP_ARGS[*]:1}" +else + echo "ERROR: supports either 'SampleApp' or 'VisualBench' as valid apps" +fi |