9636c0c3eff7697a75e4eba2c01f2830fc3b0856
[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=${GUILE-guile}
22 export MES=${MES-src/mes}
23 export MES_ARENA=${MES_ARENA-100000000}
24
25 set -e
26 bash build-aux/check-boot.sh
27
28 tests="
29 tests/boot.test
30 tests/read.test
31 tests/base.test
32 tests/quasiquote.test
33 tests/let.test
34 tests/closure.test
35 tests/scm.test
36 tests/display.test
37 tests/cwv.test
38 tests/math.test
39 tests/vector.test
40 tests/srfi-1.test
41 tests/srfi-13.test
42 tests/srfi-14.test
43 tests/srfi-43.test
44 tests/optargs.test
45 tests/fluids.test
46 tests/catch.test
47 tests/record.test
48 tests/getopt-long.test
49 tests/guile.test
50 tests/syntax.test
51 tests/let-syntax.test
52 tests/pmatch.test
53 tests/match.test
54 tests/psyntax.test
55 "
56
57 slow_or_broken="
58 tests/peg.test
59 "
60
61 tests=$(for t in $tests; do echo $t-guile; echo $t; done)
62
63 set +e
64 fail=0
65 total=0
66 for t in $tests; do
67     if [ ! -f $t ]; then
68         echo $t: [SKIP];
69         continue
70     fi
71     sh "$t" &> $t.log
72     r=$?
73     total=$((total+1))
74     if [ $r = 0 ]; then
75         echo $t: [OK]
76     else
77         echo $t: [FAIL]
78         fail=$((fail+1))
79     fi
80 done
81 if [ $fail != 0 ]; then
82     echo FAILED: $fail/$total
83     exit 1
84 else
85     echo PASS: $total
86 fi
87
88 sh build-aux/check-mescc.sh