1#!/bin/bash 2 3# Copy the tests across. 4adb sync 5 6if tty -s; then 7 green="\033[1;32m" 8 red="\033[1;31m" 9 plain="\033[0m" 10else 11 green="" 12 red="" 13 plain="" 14fi 15 16failures=0 17 18check_failure() { 19 if [ $? -eq 0 ]; then 20 echo -e "${green}[PASS]${plain}" 21 else 22 failures=$(($failures+1)) 23 echo -e "${red}[FAIL]${plain}" 24 fi 25} 26 27if [ -e "$ANDROID_PRODUCT_OUT/data/nativetest/tinyxml2-xmltest/tinyxml2-xmltest" ]; then 28 adb shell "cd /data/nativetest/tinyxml2-xmltest; ./tinyxml2-xmltest" 29 check_failure 30fi 31if [ -e "$ANDROID_PRODUCT_OUT/data/nativetest64/tinyxml2-xmltest/tinyxml2-xmltest" ]; then 32 adb shell "cd /data/nativetest64/tinyxml2-xmltest; ./tinyxml2-xmltest" 33 check_failure 34fi 35 36echo "_________________________________________________________________________" 37echo 38if [ $failures -ne 0 ]; then 39 echo -e "${red}FAILED${plain}: $failures" 40fi 41exit $failures 42