build: configure: Handle VAR=VALUE. Update help.
[mes.git] / check.sh
1 #! /bin/sh
2
3 # Mes --- Maxwell Equations of Software
4 # Copyright © 2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
5 #
6 # This file is part of Mes.
7 #
8 # Mes is free software; you can redistribute it and/or modify it
9 # under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 3 of the License, or (at
11 # your option) any later version.
12 #
13 # Mes is distributed in the hope that it will be useful, but
14 # WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 # GNU General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with Mes.  If not, see <http://www.gnu.org/licenses/>.
20
21 export GUILE MES MES_ARENA
22 GUILE=${GUILE-guile}
23 MES=${MES-src/mes}
24 MES_ARENA=${MES_ARENA-100000000}
25
26 set -e
27 bash build-aux/check-boot.sh
28
29 tests="
30 tests/boot.test
31 tests/read.test
32 tests/base.test
33 tests/quasiquote.test
34 tests/let.test
35 tests/closure.test
36 tests/scm.test
37 tests/display.test
38 tests/cwv.test
39 tests/math.test
40 tests/vector.test
41 tests/srfi-1.test
42 tests/srfi-13.test
43 tests/srfi-14.test
44 tests/srfi-43.test
45 tests/optargs.test
46 tests/fluids.test
47 tests/catch.test
48 tests/record.test
49 tests/getopt-long.test
50 tests/guile.test
51 tests/syntax.test
52 tests/let-syntax.test
53 tests/pmatch.test
54 tests/match.test
55 tests/psyntax.test
56 "
57
58 slow_or_broken="
59 tests/peg.test
60 "
61
62 tests=$(for t in $tests; do echo $t-guile; echo $t; done)
63
64 set +e
65 fail=0
66 total=0
67 for t in $tests; do
68     if [ ! -f $t ]; then
69         echo $t: [SKIP];
70         continue
71     fi
72     sh "$t" &> $t.log
73     r=$?
74     total=$((total+1))
75     if [ $r = 0 ]; then
76         echo $t: [OK]
77     else
78         echo $t: [FAIL]
79         fail=$((fail+1))
80     fi
81 done
82 if [ $fail != 0 ]; then
83     echo FAILED: $fail/$total
84     exit 1
85 else
86     echo PASS: $total
87 fi
88
89 sh build-aux/check-mescc.sh