diff options
author | djsollen <djsollen@google.com> | 2015-07-31 10:25:17 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-31 10:25:17 -0700 |
commit | 5119ac069e6cf70175b5581eedee7d07347b216a (patch) | |
tree | d378fb94f4872bd57780bddd41fd9208bdde93bc /platform_tools | |
parent | b411b3b87dcdfc124f7eec5581d510a5282a8563 (diff) |
Update Android Testing apps to support release mode
BUG=skia:4152
Review URL: https://codereview.chromium.org/1259123003
Diffstat (limited to 'platform_tools')
-rwxr-xr-x | platform_tools/android/bin/android_install_app | 13 | ||||
-rwxr-xr-x | platform_tools/android/bin/android_setup.sh | 1 | ||||
-rw-r--r-- | platform_tools/android/gyp/skia_android.gypi | 13 |
3 files changed, 20 insertions, 7 deletions
diff --git a/platform_tools/android/bin/android_install_app b/platform_tools/android/bin/android_install_app index f61987d4ab..83b879f444 100755 --- a/platform_tools/android/bin/android_install_app +++ b/platform_tools/android/bin/android_install_app @@ -54,9 +54,16 @@ then $ADB ${DEVICE_SERIAL} uninstall com.skia > /dev/null fi -BUILD_TYPE_LC=$(echo $BUILDTYPE | tr "[:upper:]" "[:lower:]") +if [[ "$BUILDTYPE" == "Release" ]]; +then + apk_suffix="release-unsigned.apk" +else + apk_suffix="debug.apk" +fi + + APP_LC=$(echo $app | tr "[:upper:]" "[:lower:]") -echo "Installing ${APP_LC} from ${APP_LC}/build/outputs/apk/${APP_LC}-${ANDROID_ARCH}-${BUILD_TYPE_LC}.apk" -$ADB ${DEVICE_SERIAL} install -r ${SCRIPT_DIR}/../apps/${APP_LC}/build/outputs/apk/${APP_LC}-${ANDROID_ARCH}-${BUILD_TYPE_LC}.apk +echo "Installing ${APP_LC} from ${APP_LC}/build/outputs/apk/${APP_LC}-${ANDROID_ARCH}-${apk_suffix}" +$ADB ${DEVICE_SERIAL} install -r ${SCRIPT_DIR}/../apps/${APP_LC}/build/outputs/apk/${APP_LC}-${ANDROID_ARCH}-${apk_suffix} diff --git a/platform_tools/android/bin/android_setup.sh b/platform_tools/android/bin/android_setup.sh index af2356945c..d42a3ac21b 100755 --- a/platform_tools/android/bin/android_setup.sh +++ b/platform_tools/android/bin/android_setup.sh @@ -171,6 +171,7 @@ setup_device() { source $SCRIPT_DIR/utils/setup_toolchain.sh DEFINES="${DEFINES} android_toolchain=${TOOLCHAIN_TYPE}" + DEFINES="${DEFINES} android_buildtype=${BUILDTYPE}" exportVar GYP_DEFINES "$DEFINES $GYP_DEFINES" SKIA_SRC_DIR=$(cd "${SCRIPT_DIR}/../../.."; pwd) diff --git a/platform_tools/android/gyp/skia_android.gypi b/platform_tools/android/gyp/skia_android.gypi index 48908cb93b..4e32fcbf7d 100644 --- a/platform_tools/android/gyp/skia_android.gypi +++ b/platform_tools/android/gyp/skia_android.gypi @@ -38,6 +38,11 @@ 'android_arch%': "mips64", 'android_variant%': "mips64", }], + [ 'android_buildtype == "Release"', { + 'android_apk_suffix': "release-unsigned.apk", + }, { + 'android_apk_suffix': "debug.apk", + }], ], }, 'targets': [ @@ -96,11 +101,11 @@ }], ], 'outputs': [ - '<(android_base)/apps/sample_app/build/outputs/apk/sample_app-arm-debug.apk', + '<(android_base)/apps/sample_app/build/outputs/apk/sample_app-<(android_variant)-<(android_apk_suffix)', ], 'action': [ '<(android_base)/apps/gradlew', - ':sample_app:assemble<(android_variant)Debug', + ':sample_app:assemble<(android_variant)<(android_buildtype)', '-p<(android_base)/apps/sample_app', '-PsuppressNativeBuild', ], @@ -159,11 +164,11 @@ }], ], 'outputs': [ - '<(android_base)/apps/visualbench/build/outputs/apk/visualbench-arm-debug.apk', + '<(android_base)/apps/visualbench/build/outputs/apk/visualbench-<(android_variant)-<(android_apk_suffix)', ], 'action': [ '<(android_base)/apps/gradlew', - ':visualbench:assemble<(android_variant)Debug', + ':visualbench:assemble<(android_variant)<(android_buildtype)', '-p<(android_base)/apps/visualbench', '-PsuppressNativeBuild', ], |