doc: Release udpate.
[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-200000000} #9GiB
24
25 set -e
26 bash 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/optargs.test
44 tests/fluids.test
45 tests/catch.test
46 tests/record.test
47 tests/getopt-long.test
48 tests/guile.test
49 tests/syntax.test
50 tests/let-syntax.test
51 tests/pmatch.test
52 tests/match.test
53 tests/psyntax.test
54 "
55
56 slow_or_broken="
57 tests/peg.test
58 "
59
60 tests=$(for t in $tests; do echo $t-guile; echo $t; done)
61
62 set +e
63 fail=0
64 total=0
65 for t in $tests; do
66     if [ ! -f $t ]; then
67         echo $t: [SKIP];
68         continue
69     fi
70     sh "$t" &> $t.log
71     r=$?
72     total=$((total+1))
73     if [ $r = 0 ]; then
74         echo $t: [OK]
75     else
76         echo $t: [FAIL]
77         fail=$((fail+1))
78     fi
79 done
80 if [ $fail != 0 ]; then
81     echo FAILED: $fail/$total
82     exit 1
83 else
84     echo PASS: $total
85 fi
86
87 sh check-mescc.sh