Elliott Hughes | 3eae8e0 | 2019-12-18 14:17:17 -0800 | [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 | # Run the 32-bit tests. |
frankfeng | 726e3ec | 2020-10-16 13:55:24 -0700 | [diff] [blame] | 28 | if [ -e "$ANDROID_PRODUCT_OUT/data/nativetest/mathtest/mathtest" ]; then |
| 29 | adb shell /data/nativetest/mathtest/mathtest /data/nativetest/mathtest/math/test/testcases/directed/* |
| 30 | check_failure |
| 31 | fi |
Elliott Hughes | 3eae8e0 | 2019-12-18 14:17:17 -0800 | [diff] [blame] | 32 | |
| 33 | # TODO: these tests are currently a bloodbath. |
| 34 | #adb shell 'cp /data/nativetest/ulp/math/test/runulp.sh /data/nativetest/ulp/ && sh /data/nativetest/ulp/runulp.sh' |
| 35 | #check_failure |
| 36 | |
| 37 | # Run the 64-bit tests. |
frankfeng | 726e3ec | 2020-10-16 13:55:24 -0700 | [diff] [blame] | 38 | if [ -e "$ANDROID_PRODUCT_OUT/data/nativetest64/mathtest/mathtest" ]; then |
| 39 | adb shell /data/nativetest64/mathtest/mathtest /data/nativetest64/mathtest/math/test/testcases/directed/* |
| 40 | check_failure |
| 41 | fi |
Elliott Hughes | 3eae8e0 | 2019-12-18 14:17:17 -0800 | [diff] [blame] | 42 | |
| 43 | # TODO: these tests are currently a bloodbath. |
| 44 | #adb shell 'cp /data/nativetest64/ulp/math/test/runulp.sh /data/nativetest64/ulp/ && sh /data/nativetest64/ulp/runulp.sh' |
| 45 | #check_failure |
| 46 | |
| 47 | echo |
| 48 | echo "_________________________________________________________________________" |
| 49 | echo |
| 50 | if [ $failures -ne 0 ]; then |
| 51 | echo -e "${red}FAILED${plain}: $failures" |
| 52 | fi |
| 53 | exit $failures |