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

Side by Side Diff: platform_tools/android/bin/android_setup.sh

Issue 22929006: default to device type of last build if no device type is given (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: addressing comments Created 7 years, 4 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 | Annotate | Revision Log
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 # 2 #
3 # android_setup.sh: Sets environment variables used by other Android scripts. 3 # android_setup.sh: Sets environment variables used by other Android scripts.
4 4
5 # Parse the arguments for a DEVICE_ID. 5 # Parse the arguments for a DEVICE_ID.
6 DEVICE_ID="" 6 DEVICE_ID=""
7 DEVICE_SERIAL="" 7 DEVICE_SERIAL=""
8 while (( "$#" )); do 8 while (( "$#" )); do
9 if [[ $(echo "$1" | grep "^-d$") != "" ]]; 9 if [[ $(echo "$1" | grep "^-d$") != "" ]];
10 then 10 then
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 setup_device() { 153 setup_device() {
154 DEFINES="OS=android" 154 DEFINES="OS=android"
155 DEFINES="${DEFINES} host_os=$(uname -s | sed -e 's/Linux/linux/;s/Darwin/mac/' )" 155 DEFINES="${DEFINES} host_os=$(uname -s | sed -e 's/Linux/linux/;s/Darwin/mac/' )"
156 DEFINES="${DEFINES} skia_os=android" 156 DEFINES="${DEFINES} skia_os=android"
157 DEFINES="${DEFINES} android_base=${SCRIPT_DIR}/.." 157 DEFINES="${DEFINES} android_base=${SCRIPT_DIR}/.."
158 DEFINES="${DEFINES} skia_shared_lib=1" 158 DEFINES="${DEFINES} skia_shared_lib=1"
159 159
160 # Setup the build variation depending on the target device 160 # Setup the build variation depending on the target device
161 TARGET_DEVICE="$1" 161 TARGET_DEVICE="$1"
162 162
163
163 if [ -z "$TARGET_DEVICE" ]; then 164 if [ -z "$TARGET_DEVICE" ]; then
164 echo "INFO: no target device type was specified so using the default 'arm_v7 '" 165 if [ -f .android_config ]; then
165 TARGET_DEVICE="arm_v7" 166 TARGET_DEVICE=$(cat .android_config)
167 echo "INFO: no target device was specified so using the device (${TARGET_D EVICE}) from the most recent build"
168 else
169 TARGET_DEVICE="arm_v7"
170 echo "INFO: no target device type was specified so using the default '${TA RGET_DEVICE}'"
171 fi
166 fi 172 fi
167 173
168 case $TARGET_DEVICE in 174 case $TARGET_DEVICE in
169 nexus_s) 175 nexus_s)
170 DEFINES="${DEFINES} skia_arch_type=arm arm_neon=1 arm_version=7 arm_thumb= 1" 176 DEFINES="${DEFINES} skia_arch_type=arm arm_neon=1 arm_version=7 arm_thumb= 1"
171 DEFINES="${DEFINES} skia_texture_cache_mb_limit=24" 177 DEFINES="${DEFINES} skia_texture_cache_mb_limit=24"
172 ANDROID_ARCH="arm" 178 ANDROID_ARCH="arm"
173 ;; 179 ;;
174 nexus_4 | nexus_7 | nexus_10) 180 nexus_4 | nexus_7 | nexus_10)
175 DEFINES="${DEFINES} skia_arch_type=arm arm_neon=1 arm_version=7 arm_thumb= 1" 181 DEFINES="${DEFINES} skia_arch_type=arm arm_neon=1 arm_version=7 arm_thumb= 1"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 else 312 else
307 $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST 313 $ADB $DEVICE_SERIAL push $HOST_SRC $ANDROID_DST
308 fi 314 fi
309 } 315 }
310 316
311 # Set up the device. 317 # Set up the device.
312 setup_device "${DEVICE_ID}" 318 setup_device "${DEVICE_ID}"
313 if [[ "$?" != "0" ]]; then 319 if [[ "$?" != "0" ]]; then
314 exit 1 320 exit 1
315 fi 321 fi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698