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

Unified Diff: platform_tools/android/bin/android_run_skia

Issue 870643002: android_run_skia: dump logcat on failure (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 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_run_skia
diff --git a/platform_tools/android/bin/android_run_skia b/platform_tools/android/bin/android_run_skia
index 81c4fee0135f595db4efca15dad39024d869eb44..35380d0f186239d0a8a9754c444f25389c96f21c 100755
--- a/platform_tools/android/bin/android_run_skia
+++ b/platform_tools/android/bin/android_run_skia
@@ -23,11 +23,13 @@ if [[ -n $RESOURCE_PATH ]]; then
adb_push_if_needed "${SKIA_SRC_DIR}/resources" $RESOURCE_PATH
fi
+$ADB $DEVICE_SERIAL logcat -c
STATUS_FILENAME="/data/local/tmp/.skia_tmp_$(date +%s%N)"
$ADB ${DEVICE_SERIAL} shell \
"LD_LIBRARY_PATH=/data/local/tmp:$LD_LIBRARY_PATH \
/data/local/tmp/skia_launcher ${APP_ARGS[*]}; echo \$? > ${STATUS_FILENAME}"
borenet 2015/01/22 17:59:02 Why not just "logcat -d" here?
djsollen 2015/01/22 18:07:14 agreed
djsollen 2015/01/22 18:09:50 I see now that you are just doing this in the fail
if [ -z "$($ADB $DEVICE_SERIAL shell 'if [ -f $STATUS_FILENAME ]; then echo exists; fi')" ]; then
+ $ADB $DEVICE_SERIAL logcat -d
echo "***********************************************************************"
echo "The application terminated unexpectedly and did not produce an exit code"
echo "***********************************************************************"
@@ -39,6 +41,7 @@ $ADB ${DEVICE_SERIAL} shell rm -f ${STATUS_FILENAME}
# check to see if the 'cat' command failed and print errors accordingly
if [[ ${EXIT_CODE} == *${STATUS_FILENAME}* ]]; then
+ $ADB $DEVICE_SERIAL logcat -d
echo "***********************************************************************"
echo "ADB failed to retrieve the application's exit code"
echo "***********************************************************************"
@@ -47,6 +50,7 @@ fi
echo "EXIT_CODE is ${EXIT_CODE}"
if [ $'0\r' != "${EXIT_CODE}" ]; then
+ $ADB $DEVICE_SERIAL logcat -d
exit 1
fi
exit 0
« 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