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

Unified Diff: platform_tools/android/bin/android_install_app

Issue 1181973008: Modify android_install_app to install VisualBench (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: cleanup Created 5 years, 6 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
« no previous file with comments | « no previous file | platform_tools/android/bin/android_launch_app » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: platform_tools/android/bin/android_install_app
diff --git a/platform_tools/android/bin/android_install_app b/platform_tools/android/bin/android_install_app
index b43b77d69eb29ab934a0cd12cef4005538f3d1a1..a8c1a12b2b6edfbab8c72d5073970c89a135e0d9 100755
--- a/platform_tools/android/bin/android_install_app
+++ b/platform_tools/android/bin/android_install_app
@@ -9,6 +9,7 @@ function print_usage {
echo " -h Prints this help message"
echo " --release Install the release build of Skia"
echo " -s [device_s/n] Serial number of the device to be used"
+ echo " AppName Can be either SampleApp or VisualBench"
}
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
@@ -19,31 +20,42 @@ source $SCRIPT_DIR/utils/setup_adb.sh
forceRemoval="false"
installLauncher="false"
installOptions="-r"
+app=""
-for arg in ${APP_ARGS[@]}
-do
- if [[ "${arg}" == "-f" ]];
- then
+for arg in ${APP_ARGS[@]}; do
+ if [[ "${arg}" == "-f" ]]; then
forceRemoval="true"
- elif [[ "${arg}" == "-h" ]];
- then
+ elif [[ "${arg}" == "-h" ]]; then
print_usage
exit
- elif [[ "${arg}" == "-r" ]];
- then
+ elif [[ "${arg}" == "-r" ]]; then
echo "DEPRECATED: -r is now a no-op"
- else
+ elif [[ ${arg} == '-'* ]]; then
echo "ERROR: unrecognized option ${arg}"
print_usage
exit 1;
+ else
+ if [[ ${app} != "" ]]; then
+ echo "ERROR: app already defined ${app}"
+ exit 1;
+ else
+ app=${arg}
+ fi
fi
done
+if [[ ${app} == "" ]]; then
+ echo "defaulting to installing SampleApp."
+ app="SampleApp"
+fi
+
+
if [[ "$forceRemoval" == "true" ]];
then
echo "Forcing removal of previously installed packages"
$ADB ${DEVICE_SERIAL} uninstall com.skia > /dev/null
fi
-echo "Installing Skia App from ${SKIA_OUT}/${BUILDTYPE}"
-$ADB ${DEVICE_SERIAL} install ${installOptions} ${SKIA_OUT}/${BUILDTYPE}/android/bin/SkiaAndroid.apk
+echo "Installing ${app} from ${SKIA_OUT}/${BUILDTYPE}"
+$ADB ${DEVICE_SERIAL} install ${installOptions} ${SKIA_OUT}/${BUILDTYPE}/android/${app}/bin/${app}.apk
+
« no previous file with comments | « no previous file | platform_tools/android/bin/android_launch_app » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698