• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/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.
28if [ -e "$ANDROID_PRODUCT_OUT/data/nativetest/mathtest/mathtest" ]; then
29  adb shell /data/nativetest/mathtest/mathtest \
30    '$(ls /data/nativetest/mathtest/math/test/testcases/directed/* | egrep -v "(atan2|cosh|exp10)")'
31  check_failure
32fi
33
34# Run the 64-bit tests.
35if [ -e "$ANDROID_PRODUCT_OUT/data/nativetest64/mathtest/mathtest" ]; then
36  adb shell /data/nativetest64/mathtest/mathtest \
37    '$(ls /data/nativetest/mathtest/math/test/testcases/directed/* | egrep -v "(atan2|cosh|exp10)")'
38  check_failure
39fi
40
41echo
42echo "_________________________________________________________________________"
43echo
44if [ $failures -ne 0 ]; then
45  echo -e "${red}FAILED${plain}: $failures"
46fi
47exit $failures
48