3 # GNU Mes --- Maxwell Equations of Software
4 # Copyright © 2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
6 # This file is part of GNU Mes.
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.
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.
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/>.
22 . ${srcdest}build-aux/config.sh
23 . ${srcdest}build-aux/trace.sh
26 [ -z "$MESCC" ] && MESCC=scripts/mescc
28 MES_PREFIX=${MES_PREFIX-mes}
32 BLOOD_ELF=${BLOOD_ELF-blood-elf}
33 MES_SEED=${MES_SEED-../mes-seed}
34 MESCC=${MESCC-$(command -v mescc)}
35 [ -z "$MESCC" ] && MESCC=scripts/mescc
36 MES=${MES-$(command -v mes)}
37 [ -z "$MES" ] && MES=src/mes
39 if ! command -v $GUILE > /dev/null; then
81 47-function-expression
102 76-pointer-arithmetic
110 7e-struct-array-access
111 7f-struct-pointer-arithmetic
112 7g-struct-byte-word-field
117 7l-struct-any-size-array
118 7m-struct-char-array-assign
119 7n-struct-struct-array
128 83-heterogenoous-init
145 # 90: needs GNU, fails for mescc, passes for tcc
153 expect=$(echo $broken | wc -w)
157 mkdir -p scaffold/tests
159 if [ -z "${t/[012][0-9]-*/}" ]; then
162 elif [ -z "${t/[34][0-9]-*/}" ]; then
165 elif [ -z "${t/[78][0-9a-z]-*/}" ]; then
168 elif [ -z "${t/9[0-9]-*/}" ]; then
175 sh ${srcdest}build-aux/test.sh "scaffold/tests/$t" &> scaffold/tests/"$t".log
187 [ $expect != 0 ] && echo "expect: $expect"
188 [ $fail != 0 ] && echo "failed: $fail"
189 [ $fail -lt $expect ] && echo "solved: $(($expect - $fail))"
192 if [ $fail != 0 -a $fail -gt $expect ]; then
193 echo FAILED: $fail/$total
195 elif [ $fail != 0 ]; then
196 echo PASS: $pass/$total