Debian Codegraph @

run-tests

raw symbols SCIP
1 #!/bin/sh
2
3 # Takes one, optional argument, the executable to use. If not set, will use
4 # src/angband.
5
6 if test $# -gt 0 ; then
7 if test $# -eq 1 ; then
8 angexe="$1"
9 else
10 echo "run-tests: too many arguments" 2>&1
11 echo "usage: run-tests [executable]" 2>&1
12 exit 1
13 fi
14 else
15 angexe=src/angband
16 fi
17
18 RAN=0
19 OK=0
20
21 for x in `find tests -mindepth 2 -maxdepth 2 -type d -print`; do
22 tests/run-test -x "$angexe" $x
23 if [ $? -eq 0 ]; then
24 OK=$(expr $OK + 1)
25 fi
26 RAN=$(expr $RAN + 1)
27 done
28
29 FAIL=$(expr $RAN - $OK)
30
31 echo "Total: $OK/$RAN"
32 exit $FAIL