7c4eb0b3a5b075b5c656ecae57d0b7837aa7a069
[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 CC32
22 export GUILE MES MES_ARENA
23 CC32=${CC32-$(command -v i686-unknown-linux-gnu-gcc)}
24 GUILE=${GUILE-guile}
25 MES=${MES-src/mes}
26 MES_ARENA=${MES_ARENA-100000000}
27
28 set -e
29 bash build-aux/check-boot.sh
30
31 tests="
32 tests/boot.test
33 tests/read.test
34 tests/base.test
35 tests/quasiquote.test
36 tests/let.test
37 tests/closure.test
38 tests/scm.test
39 tests/display.test
40 tests/cwv.test
41 tests/math.test
42 tests/vector.test
43 tests/srfi-1.test
44 tests/srfi-13.test
45 tests/srfi-14.test
46 tests/srfi-43.test
47 tests/optargs.test
48 tests/fluids.test
49 tests/catch.test
50 tests/record.test
51 tests/getopt-long.test
52 tests/guile.test
53 tests/syntax.test
54 tests/let-syntax.test
55 tests/pmatch.test
56 tests/match.test
57 tests/psyntax.test
58 "
59
60 slow_or_broken="
61 tests/peg.test
62 "
63
64 tests=$(for t in $tests; do echo $t-guile; echo $t; done)
65
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     sh "$t" &> $t.log
75     r=$?
76     total=$((total+1))
77     if [ $r = 0 ]; then
78         echo $t: [OK]
79     else
80         echo $t: [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
90
91 sh build-aux/check-mescc.sh