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
72 26_character_constants
85 38_multiple_array_index
92 44_scoped_declarations
111 26_character_constants
120 49_bracket_evaluation
124 #22_floating_point ; float
125 #23_type_coercion ; float
126 #24_math_library ; float
128 #28_strings ; TODO: strncpy strchr strrchr memset memcpy memcmp
129 #30_hanoi ; fails with GCC
130 #34_array_assignment ; fails with GCC
131 #39_typedef ;unsupported: (decl (decl-spec-list (stor-spec (typedef)) (type-spec (typename "MyFunStruct"))) (init-declr-list (init-declr (ptr-declr (pointer) (ident "MoreFunThanEver")))))
133 #40_stdio ; f* functions
134 #42_function_pointer ; f* functions
135 #49_bracket_evaluation ; float
141 expect=$(echo $broken | wc -w)
142 ARGS="arg1 arg2 arg3 arg4 arg5"
147 mkdir -p scaffold/tinycc
149 if [ ! -f $TINYCC_PREFIX/"$t.c" ]; then
153 cp $TINYCC_PREFIX/tests/tests2/$i* scaffold/tinycc
154 sh ${srcdest}build-aux/test.sh "scaffold/tinycc/$t" &> scaffold/tinycc/"$t".log
165 [ $expect != 0 ] && echo "expect: $expect"
166 [ $fail != 0 ] && echo "failed: $fail"
167 [ $fail -lt $expect ] && echo "solved: $(($expect - $fail))"
170 if [ $fail != 0 -a $fail -gt $expect ]; then
171 echo FAILED: $fail/$total
173 elif [ $fail != 0 ]; then
174 echo PASS: $pass/$total