core: Add module-define!
[mes.git] / build-aux / check-mes.sh
1 #! /bin/sh
2
3 # GNU Mes --- Maxwell Equations of Software
4 # Copyright © 2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
5 #
6 # This file is part of GNU Mes.
7 #
8 # GNU 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 # GNU 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 GNU Mes.  If not, see <http://www.gnu.org/licenses/>.
20
21 set -e
22
23 . ${srcdest}build-aux/config.sh
24 . ${srcdest}build-aux/trace.sh
25
26 if [ "$MES" = guile ]; then
27     mes=guile-
28 fi
29 BASH=${BASH-bash}
30 GUILE=${GUILE-guile}
31 MES=${MES-src/mes}
32 MES_ARENA=${MES_ARENA-100000000}
33
34 tests="
35 tests/boot.test
36 tests/read.test
37 tests/srfi-0.test
38 tests/macro.test
39 tests/base.test
40 tests/quasiquote.test
41 tests/let.test
42 tests/closure.test
43 tests/scm.test
44 tests/display.test
45 tests/cwv.test
46 tests/math.test
47 tests/vector.test
48 tests/srfi-1.test
49 tests/srfi-9.test
50 tests/srfi-13.test
51 tests/srfi-14.test
52 tests/srfi-43.test
53 tests/optargs.test
54 tests/fluids.test
55 tests/catch.test
56 tests/getopt-long.test
57 tests/guile.test
58 tests/syntax.test
59 tests/let-syntax.test
60 tests/pmatch.test
61 tests/match.test
62 tests/psyntax.test
63 "
64
65 mkdir -p tests
66 set +e
67 fail=0
68 total=0
69 for t in $tests; do
70     if [ ! -f $t ]; then
71         echo $t: [SKIP];
72         continue
73     fi
74     ${top_builddir}/pre-inst-env sh "$t" &> $t.${mes}log
75     r=$?
76     total=$((total+1))
77     if [ $r = 0 ]; then
78         echo $t: [${mes}OK]
79     else
80         echo $t: [${mes}FAIL]
81         fail=$((fail+1))
82     fi
83 done
84 if [ $fail != 0 ]; then
85     echo FAILED: $fail/$total
86     exit 1
87 else
88     echo PASS: $total
89 fi