diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-05-01 19:30:35 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-05-01 19:30:35 +0000 |
commit | 123f3d74e35e0f9c69961553b8eac5e12f763de3 (patch) | |
tree | a10bfd94d1e36af6d31ba641cf7b4d0970015c18 /platform_tools | |
parent | 658e59507da3ae1f0202cafcdd58604216869d55 (diff) |
Add more detailed logging when things go wrong in android_run_skia
R=borenet@google.com, halcanary@google.com
Author: djsollen@google.com
Review URL: https://codereview.chromium.org/263733006
git-svn-id: http://skia.googlecode.com/svn/trunk@14513 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'platform_tools')
-rwxr-xr-x | platform_tools/android/bin/android_run_skia | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/platform_tools/android/bin/android_run_skia b/platform_tools/android/bin/android_run_skia index ebcc041c2d..7bc9671b89 100755 --- a/platform_tools/android/bin/android_run_skia +++ b/platform_tools/android/bin/android_run_skia @@ -24,10 +24,23 @@ STATUS_FILENAME="/data/local/tmp/.skia_tmp_$(date +%s%N)" $ADB ${DEVICE_SERIAL} shell \ "/data/local/tmp/skia_launcher ${APP_ARGS[@]}; echo \$? > ${STATUS_FILENAME}" if [ -z "$($ADB $DEVICE_SERIAL shell 'if [ -f $STATUS_FILENAME ]; then echo exists; fi')" ]; then + echo "***********************************************************************" + echo "The application terminated unexpectedly and did not produce an exit code" + echo "***********************************************************************" exit 1 fi + EXIT_CODE=`$ADB ${DEVICE_SERIAL} shell cat ${STATUS_FILENAME}` -$ADB ${DEVICE_SERIAL} shell rm ${STATUS_FILENAME} +$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 + echo "***********************************************************************" + echo "ADB failed to retrieve the application's exit code" + echo "***********************************************************************" + exit 1 +fi + echo "EXIT_CODE is ${EXIT_CODE}" if [ $'0\r' != "${EXIT_CODE}" ]; then exit 1 |