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
28 DIFF=${DIFF-$(command -v diff)} || true
29 [ -z "$DIFF" ] && DIFF="sh scripts/diff.scm"
31 t=${1-scaffold/tests/t}
37 sh ${srcdest}build-aux/cc.sh "$t"
40 [ -f "$t".exit ] && r=$(cat "$t".exit)
42 "$o".gcc-out $ARGS > "$o".gcc-stdout
48 if [ -f "$t".expect ]; then
49 $DIFF -ub "$t".expect "$o".gcc-stdout;
53 rm -f "$t".mes-gcc-out
54 if [ -n "$CC64" ]; then
55 sh ${srcdest}build-aux/cc64-mes.sh "$t"
58 [ -f "$t".exit ] && r=$(cat "$t".exit)
60 "$o".x86_64-mes-gcc-out $ARGS > "$o".x86_64-mes-gcc-stdout
62 cat "$t".x86_64-mes-gcc-stdout
66 if [ -f "$t".expect ]; then
67 $DIFF -ub "$t".expect "$o".x86_64-mes-gcc-stdout;
72 sh ${srcdest}build-aux/cc-x86_64-mes.sh "$t"
75 [ -f "$t".exit ] && r=$(cat "$t".exit)
77 "$o".x86_64-mes-out $ARGS > "$o".x86_64-mes-stdout
79 cat "$o".x86_64-mes-stdout
83 if [ -f "$t".expect ]; then
84 $DIFF -ub "$t".expect "$o".x86_64-mes-stdout;