Elliott Hughes | 5bd3512 | 2020-10-22 16:48:49 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | # Copy the tests across. |
| 4 | adb sync |
| 5 | |
| 6 | if tty -s; then |
| 7 | green="\033[1;32m" |
| 8 | red="\033[1;31m" |
| 9 | plain="\033[0m" |
| 10 | else |
| 11 | green="" |
| 12 | red="" |
| 13 | plain="" |
| 14 | fi |
| 15 | |
| 16 | failures=0 |
| 17 | |
| 18 | check_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 | |
| 27 | if [ -e "$ANDROID_PRODUCT_OUT/data/nativetest/tinyxml2-xmltest/tinyxml2-xmltest" ]; then |
| 28 | adb shell "cd /data/nativetest/tinyxml2-xmltest; ./tinyxml2-xmltest" |
| 29 | check_failure |
| 30 | fi |
| 31 | if [ -e "$ANDROID_PRODUCT_OUT/data/nativetest64/tinyxml2-xmltest/tinyxml2-xmltest" ]; then |
| 32 | adb shell "cd /data/nativetest64/tinyxml2-xmltest; ./tinyxml2-xmltest" |
| 33 | check_failure |
| 34 | fi |
| 35 | |
| 36 | echo "_________________________________________________________________________" |
| 37 | echo |
| 38 | if [ $failures -ne 0 ]; then |
| 39 | echo -e "${red}FAILED${plain}: $failures" |
| 40 | fi |
| 41 | exit $failures |