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

Unified Diff: platform_tools/android/bin/android_perf

Issue 262053007: Fix android_perf script to work with changes from a137675 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: platform_tools/android/bin/android_perf
diff --git a/platform_tools/android/bin/android_perf b/platform_tools/android/bin/android_perf
index 58e43202a44f272a4d1984382e0e3678e10fdb36..1d0b558070c308ea7675594a023b22db38791b0f 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() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698