blob: 61efeaf242664a521367ddd56df2f53c16d86272 [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.
28adb shell /data/nativetest/mathtest/mathtest /data/nativetest/mathtest/math/test/testcases/directed/*
29check_failure
30
31# TODO: these tests are currently a bloodbath.
32#adb shell 'cp /data/nativetest/ulp/math/test/runulp.sh /data/nativetest/ulp/ && sh /data/nativetest/ulp/runulp.sh'
33#check_failure
34
35# Run the 64-bit tests.
36adb shell /data/nativetest64/mathtest/mathtest /data/nativetest64/mathtest/math/test/testcases/directed/*
37check_failure
38
39# TODO: these tests are currently a bloodbath.
40#adb shell 'cp /data/nativetest64/ulp/math/test/runulp.sh /data/nativetest64/ulp/ && sh /data/nativetest64/ulp/runulp.sh'
41#check_failure
42
43echo
44echo "_________________________________________________________________________"
45echo
46if [ $failures -ne 0 ]; then
47 echo -e "${red}FAILED${plain}: $failures"
48fi
49exit $failures