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

Unified Diff: platform_tools/android/bin/android_run_skia

Issue 22617002: Update Skia Android tools. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: more fixes to make the bots happy 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « platform_tools/android/bin/android_perf ('k') | platform_tools/android/bin/android_setup.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: platform_tools/android/bin/android_run_skia
diff --git a/platform_tools/android/bin/android_run_skia b/platform_tools/android/bin/android_run_skia
index 00fe37f65d7782abc800002737d2e5de8d04d173..133be35709a78bcf3539e473f013dd91b184b034 100755
--- a/platform_tools/android/bin/android_run_skia
+++ b/platform_tools/android/bin/android_run_skia
@@ -4,45 +4,32 @@
# output, and kills the app if interrupted.
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-
+source $SCRIPT_DIR/android_setup.sh
source $SCRIPT_DIR/utils/setup_adb.sh
-APP_ARGS=""
-USE_INTENT="false"
-SERIAL=""
-
-while (( "$#" )); do
-
- if [[ "$1" == "--intent" ]];
- then
- USE_INTENT="true"
- elif [[ "$1" == "-s" ]];
- then
- if [[ $# -lt 2 ]];
- then
- echo "ERROR: missing serial number"
- exit 1;
- fi
- SERIAL="-s $2"
- shift
+configuration="Debug"
+
+for arg in ${APP_ARGS[@]}
+do
+ if [[ "${arg}" == "--release" ]];
+ then
+ configuration="Release"
else
- APP_ARGS="$APP_ARGS $1"
+ runVars=("${runVars[@]}" "${arg}")
fi
shift
done
-
-if [[ "$USE_INTENT" == "true" ]];
+if [ ! -f "${SKIA_OUT}/${configuration}/lib.target/lib${runVars[0]}.so" ];
then
- $ADB $SERIAL logcat -c
- $ADB $SERIAL shell am broadcast -a com.skia.intent.action.LAUNCH_SKIA -n com.skia/.SkiaReceiver -e args "$APP_ARGS"
- trap "echo \"Interrupt.\"" INT
- eval "($ADB $SERIAL logcat)"
- trap - INT
- echo "Interrupt. Killing Skia process..."
- $SCRIPT_DIR/android_kill_skia $SERIAL
- echo "Done."
-else
- $ADB $SERIAL shell skia_launcher $APP_ARGS
+ echo "Unable to find the ${runVars[0]} library"
+ exit 1
fi
+
+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
+
+
+$ADB ${DEVICE_SERIAL} shell /data/local/tmp/skia_launcher ${runVars[@]}
« no previous file with comments | « platform_tools/android/bin/android_perf ('k') | platform_tools/android/bin/android_setup.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698