diff options
author | Elliott Hughes <enh@google.com> | 2019-12-18 14:17:17 -0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2019-12-18 14:17:17 -0800 |
commit | 3eae8e0a7e36c863c598cb5c81061d57a3ab4506 (patch) | |
tree | 0d1d5e008555d126694fd67aee6ee065724d4d2a /run-arm-optimized-routines-tests-on-android.sh | |
parent | accf6eb5b6ddd240a94062c9acbecd2ae019402f (diff) | |
download | arm-optimized-routines-3eae8e0a7e36c863c598cb5c81061d57a3ab4506.tar.gz |
arm-optimized-routines: build and run the tests.
This doesn't enable presubmit because the tests don't pass on 32-bit.
Strictly, we're also not running the ulp tests because they're a
bloodbath on both LP32 and LP64 at the moment.
But at least the 64-bit non-ulp tests are passing, and this patch is
enough to let you run any/all of the other tests.
Test: atest arm-optimized-routines-tests (slow)
Test: ./run-arm-optimized-routines-tests-on-android.sh (fast)
Change-Id: I07b78e1222064af6877f311ef9bbd76e4a9a3822
Diffstat (limited to 'run-arm-optimized-routines-tests-on-android.sh')
-rwxr-xr-x | run-arm-optimized-routines-tests-on-android.sh | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/run-arm-optimized-routines-tests-on-android.sh b/run-arm-optimized-routines-tests-on-android.sh new file mode 100755 index 0000000..61efeaf --- /dev/null +++ b/run-arm-optimized-routines-tests-on-android.sh @@ -0,0 +1,49 @@ +#!/bin/bash + +# Copy the tests across. +adb sync + +if tty -s; then + green="\033[1;32m" + red="\033[1;31m" + plain="\033[0m" +else + green="" + red="" + plain="" +fi + +failures=0 + +check_failure() { + if [ $? -eq 0 ]; then + echo -e "${green}[PASS]${plain}" + else + failures=$(($failures+1)) + echo -e "${red}[FAIL]${plain}" + fi +} + +# Run the 32-bit tests. +adb shell /data/nativetest/mathtest/mathtest /data/nativetest/mathtest/math/test/testcases/directed/* +check_failure + +# TODO: these tests are currently a bloodbath. +#adb shell 'cp /data/nativetest/ulp/math/test/runulp.sh /data/nativetest/ulp/ && sh /data/nativetest/ulp/runulp.sh' +#check_failure + +# Run the 64-bit tests. +adb shell /data/nativetest64/mathtest/mathtest /data/nativetest64/mathtest/math/test/testcases/directed/* +check_failure + +# TODO: these tests are currently a bloodbath. +#adb shell 'cp /data/nativetest64/ulp/math/test/runulp.sh /data/nativetest64/ulp/ && sh /data/nativetest64/ulp/runulp.sh' +#check_failure + +echo +echo "_________________________________________________________________________" +echo +if [ $failures -ne 0 ]; then + echo -e "${red}FAILED${plain}: $failures" +fi +exit $failures |