blob: 21163a3ed0d566aec76f3c2d2bb345c47cc27903 [file] [log] [blame]
Elliott Hughes3eae8e02019-12-18 14:17:17 -08001#!/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
27# Run the 32-bit tests.
frankfeng726e3ec2020-10-16 13:55:24 -070028if [ -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
31fi
Elliott Hughes3eae8e02019-12-18 14:17:17 -080032
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.
frankfeng726e3ec2020-10-16 13:55:24 -070038if [ -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
41fi
Elliott Hughes3eae8e02019-12-18 14:17:17 -080042
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
47echo
48echo "_________________________________________________________________________"
49echo
50if [ $failures -ne 0 ]; then
51 echo -e "${red}FAILED${plain}: $failures"
52fi
53exit $failures