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

Side by Side 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: 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 unified diff | Download patch
« no previous file with comments | « no previous file | platform_tools/android/gyp/skia_android.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 # 2 #
3 # android_install_app: installs the skia sampleApp on the device. 3 # android_install_app: installs the skia sampleApp on the device.
4 4
5 function print_usage { 5 function print_usage {
6 echo "USAGE: android_install_app [options]" 6 echo "USAGE: android_install_app [options]"
7 echo " Options: -f Forces the package to be installed by removing any " 7 echo " Options: -f Forces the package to be installed by removing any "
8 echo " previously installed packages" 8 echo " previously installed packages"
9 echo " -h Prints this help message" 9 echo " -h Prints this help message"
10 echo " --release Install the release build of Skia" 10 echo " --release Install the release build of Skia"
11 echo " -s [device_s/n] Serial number of the device to be used" 11 echo " -s [device_s/n] Serial number of the device to be used"
12 echo " --app Can be either SampleApp or VisualBench"
12 } 13 }
13 14
14 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 15 SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
15 16
16 source $SCRIPT_DIR/android_setup.sh 17 source $SCRIPT_DIR/android_setup.sh
17 source $SCRIPT_DIR/utils/setup_adb.sh 18 source $SCRIPT_DIR/utils/setup_adb.sh
18 19
19 forceRemoval="false" 20 forceRemoval="false"
20 installLauncher="false" 21 installLauncher="false"
21 installOptions="-r" 22 installOptions="-r"
23 app=""
22 24
23 for arg in ${APP_ARGS[@]} 25 for ((i=0; i < ${#APP_ARGS[@]}; i++)); do
24 do 26 arg=${APP_ARGS[i]}
25 if [[ "${arg}" == "-f" ]]; 27 if [[ "${arg}" == "-f" ]]; then
26 then
27 forceRemoval="true" 28 forceRemoval="true"
28 elif [[ "${arg}" == "-h" ]]; 29 elif [[ "${arg}" == "-h" ]]; then
29 then
30 print_usage 30 print_usage
31 exit 31 exit
32 elif [[ "${arg}" == "-r" ]]; 32 elif [[ "${arg}" == "-r" ]]; then
33 then
34 echo "DEPRECATED: -r is now a no-op" 33 echo "DEPRECATED: -r is now a no-op"
34 elif [[ "${arg}" == "--app" ]]; then
35 let i+=1
36 app=${APP_ARGS[i]}
35 else 37 else
36 echo "ERROR: unrecognized option ${arg}" 38 echo "ERROR: unrecognized option ${arg}"
djsollen 2015/06/18 16:21:14 what if instead of throwing an error we take treat
37 print_usage 39 print_usage
38 exit 1; 40 exit 1;
39 fi 41 fi
40 done 42 done
41 43
djsollen 2015/06/18 16:21:14 can we default to SampleApp to preserve the existi
42 if [[ "$forceRemoval" == "true" ]]; 44 if [[ "$forceRemoval" == "true" ]];
43 then 45 then
44 echo "Forcing removal of previously installed packages" 46 echo "Forcing removal of previously installed packages"
45 $ADB ${DEVICE_SERIAL} uninstall com.skia > /dev/null 47 $ADB ${DEVICE_SERIAL} uninstall com.skia > /dev/null
46 fi 48 fi
47 49
48 echo "Installing Skia App from ${SKIA_OUT}/${BUILDTYPE}" 50 echo "Installing ${app} from ${SKIA_OUT}/${BUILDTYPE}"
49 $ADB ${DEVICE_SERIAL} install ${installOptions} ${SKIA_OUT}/${BUILDTYPE}/android /bin/SkiaAndroid.apk 51 $ADB ${DEVICE_SERIAL} install ${installOptions} ${SKIA_OUT}/${BUILDTYPE}/android /${app}/bin/${app}.apk
52
OLDNEW
« no previous file with comments | « no previous file | platform_tools/android/gyp/skia_android.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698