-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathruntests
50 lines (46 loc) · 1.23 KB
/
runtests
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/sh
if [ $# -lt 2 ]; then
echo "Usage: $0 compiler test1 test2 ..."
echo "called from make sure"
echo "SGI compiler \"CC -LANG:std -w -I/usr/local/mpi/include -L/usr/local/mpi/lib32\""
echo "Intel compiler \"icc -w\""
echo "IBM compiler xlC or mpCC as appropriate"
echo "Tru64 compiler cxx -D__USE_STD_IOSTREAM"
exit
fi
CC=$1
export CC
shift
passed=0
failed=0
for i in $*; do
echo -n "$i: "
if [ "$TRAVIS" = 1 ]; then
# skip certain tests that don't make sense in CI
# t0003a.sh: Lotka-Volterra
# t0009a.sh, t0011a.sh, t0020a.sh: # unuran
# t0026a.sh: igraph
# t0031a.sh: MPI
if [ \
$i = test/00/t0003a.sh -o \
$i = test/00/t0009a.sh -o \
$i = test/00/t0011a.sh -o \
$i = test/00/t0020a.sh -o \
$i = test/00/t0026a.sh -o \
$i = test/00/t0031a.sh \
]; then
echo skipped
continue
fi
fi
bash $i &> /dev/null
if test $? -eq 0 ; then
passed=`expr $passed + 1`
echo passed
else
failed=`expr $failed + 1`
echo -e "\033[31mfailed\033[0m"
fi
done
echo "$passed tests passed, $failed tests failed"
exit $failed