aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-05 18:40:15 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-05 18:40:15 +0000
commite8846f3d3fbb84e96ea049459377af9b2b1faba6 (patch)
tree21ce31a62eed46788f28e7496e88ac87ee3cec91
parentce56d965069c1649afe14319cb239e6ad670682a (diff)
Fix android_perf script to work with changes from a137675
(http://crrev.com/223613004). See http://crrev.com/256413006 for a similar change. R=mtklein@google.com Author: halcanary@google.com Review URL: https://codereview.chromium.org/262053007 git-svn-id: http://skia.googlecode.com/svn/trunk@14574 2bbb7eff-a529-9590-31e7-b0007b416f81
-rwxr-xr-xplatform_tools/android/bin/android_perf37
1 files changed, 13 insertions, 24 deletions
diff --git a/platform_tools/android/bin/android_perf b/platform_tools/android/bin/android_perf
index 58e43202a4..1d0b558070 100755
--- a/platform_tools/android/bin/android_perf
+++ b/platform_tools/android/bin/android_perf
@@ -24,21 +24,7 @@ fi
# grab and remove the perf command from the input args
PERF_CMD=${APP_ARGS[0]}
unset APP_ARGS[0]
-
-configuration="Debug"
-
-for arg in ${APP_ARGS[@]}
-do
- if [[ "${arg}" == "--release" ]];
- then
- configuration="Release"
- else
- echo "${arg}"
- runVars=("${runVars[@]}" "${arg}")
- fi
-
-shift
-done
+runVars=("${APP_ARGS[@]}") # shift array indices
# We need the debug symbols from these files
PERF_TMP_DIR=$(pwd)/android_perf_tmp
@@ -62,20 +48,23 @@ perf_setup() {
adb_pull_if_needed /system/lib/libm.so $TMP_SYS_LIB
adb_pull_if_needed /system/lib/libz.so $TMP_SYS_LIB
- if [ ! -f "${SKIA_OUT}/${configuration}/lib.target/lib${runVars[0]}.so" ];
+ # BUILDTYPE variable is set by android_setup.sh
+ BUILDDIR="${SKIA_OUT}/${BUILDTYPE}"
+ if [ ! -f "${BUILDDIR}/lib/lib${runVars[0]}.so" ];
then
- echo "Unable to find the ${runVars[0]} library"
+ echo "Unable to find the ${runVars[0]} library in ${BUILDDIR}/lib."
exit 1
fi
echo "Pushing app..."
- adb_push_if_needed "${SKIA_OUT}/${configuration}/skia_launcher" /data/local/tmp
- adb_push_if_needed "${SKIA_OUT}/${configuration}/lib.target/libskia_android.so" /data/local/tmp
- adb_push_if_needed "${SKIA_OUT}/${configuration}/lib.target/lib${runVars[0]}.so" /data/local/tmp
-
- cp "${SKIA_OUT}/${configuration}/skia_launcher" $TMP_APP_LOC
- cp "${SKIA_OUT}/${configuration}/lib.target/libskia_android.so" $TMP_APP_LOC
- cp "${SKIA_OUT}/${configuration}/lib.target/lib${runVars[0]}.so" $TMP_APP_LOC
+ for lib_file in \
+ "${BUILDDIR}/skia_launcher" \
+ "${BUILDDIR}/lib/libskia_android.so" \
+ "${BUILDDIR}/lib/lib${runVars[0]}.so" \
+ ; do
+ adb_push_if_needed "$lib_file" /data/local/tmp
+ cp "$lib_file" $TMP_APP_LOC
+ done
}
perf_record() {