Fix strange failures on Android N
authorkjlubick <kjlubick@google.com>
Thu, 8 Sep 2016 20:04:30 +0000 (13:04 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 8 Sep 2016 20:04:31 +0000 (13:04 -0700)
We were seeing problems where dm ended with exit code 0, but the step still failed.
It seems they changed what N returns when a thing completes.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2319843003
TBR=bugsbunny

Review-Url: https://codereview.chromium.org/2319843003

infra/bots/recipe_modules/flavor/android_flavor.py
platform_tools/android/bin/android_run_skia

index dff11dd..93347e4 100644 (file)
@@ -38,7 +38,7 @@ def get_device(api):
       'Nexus10':       'arm_v7_neon',
       'Nexus5':        'arm_v7_neon',
       'Nexus6':        'arm_v7_neon',
-      'Nexus6p':       'arm_v7_neon',
+      'Nexus6p':       'arm64',
       'Nexus7':        'arm_v7_neon',
       'Nexus7v2':      'arm_v7_neon',
       'Nexus9':        'arm64',
index 95d9fd9..c4e9056 100755 (executable)
@@ -27,7 +27,7 @@ if [[ -n $RESOURCE_PATH ]]; then
 fi
 
 if [ $LOGCAT ]; then
-   verbose "clearing the device logs..." 
+   verbose "clearing the device logs..."
   $ADB $DEVICE_SERIAL logcat -c;
 fi
 STATUS_FILENAME="/data/local/tmp/.skia_tmp_$(date +%s%N)"
@@ -44,7 +44,7 @@ $ADB ${DEVICE_SERIAL} push ${CMD_FILENAME} /data/local/tmp
 rm ${CMD_FILENAME}
 verbose "preparing to run ${APP_ARGS[0]} on the device..."
 $ADB ${DEVICE_SERIAL} shell sh /data/local/tmp/${CMD_FILENAME}
-    
+
 if [ -z "$($ADB $DEVICE_SERIAL shell 'if [ -f $STATUS_FILENAME ]; then echo exists; fi')" ]; then
   if [ $LOGCAT ]; then $ADB $DEVICE_SERIAL logcat -d; fi
   echo "***********************************************************************"
@@ -66,7 +66,7 @@ if [[ ${EXIT_CODE} == *${STATUS_FILENAME}* ]]; then
 fi
 
 echo "EXIT_CODE is ${EXIT_CODE}"
-if [ $'0\r' != "${EXIT_CODE}" ]; then
+if [[ "${EXIT_CODE}" != 0* ]]; then
   if [ $LOGCAT ]; then $ADB $DEVICE_SERIAL logcat -d; fi
   exit 1
 fi