| 1 | #!/bin/shscip-shell filesystem . . `/bin/sh`. |
| 2 | |
| 3 | # Takes one, optional argument, the executable to use. If not set, will use |
| 4 | # src/angband. |
| 5 | |
| 6 | if testscip-shell system . . test. $# -gt 0 ; then |
| 7 | if testscip-shell system . . test. $# -eq 1 ; then |
| 8 | angexe="$1" |
| 9 | else |
| 10 | echoscip-shell system . . echo. "run-tests: too many arguments" 2>&1 |
| 11 | echoscip-shell system . . 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 `findscip-shell system . . find. tests -mindepth 2 -maxdepth 2 -type d -print`; do |
| 22 | tests/run-test -x "$angexe" $x |
| 23 | if [scip-shell system . . `[`. $? -eq 0 ]; then |
| 24 | OK=$(exprscip-shell system . . expr. $OK + 1) |
| 25 | fi |
| 26 | RAN=$(exprscip-shell system . . expr. $RAN + 1) |
| 27 | done |
| 28 | |
| 29 | FAIL=$(exprscip-shell system . . expr. $RAN - $OK) |
| 30 | |
| 31 | echoscip-shell system . . echo. "Total: $OK/$RAN" |
| 32 | exit $FAIL |