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