porting: Avoid failing in scaffold build.

* build-aux/build-scaffold.sh: Do not fail when using courage.
This commit is contained in:
Jan Nieuwenhuizen 2019-06-25 21:45:46 +02:00
parent 1ba8bf539a
commit 58864b181d
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273
2 changed files with 21 additions and 14 deletions

View file

@ -31,8 +31,15 @@ fi
. ${srcdest}build-aux/trace.sh
if $courageous; then
echo "Applying courage"
set +e
set_min_e () {
echo "Applying courage"
}
set_min_e
else
set_min_e () {
set -e
}
fi
case "$mes_cpu" in
@ -53,9 +60,9 @@ trace "CCLD ${srcdest}lib/$mes_cpu-mes-$compiler/exit-42.S" $CC\
-o exit-42
trace "TEST exit-42"
{ set +e; ./exit-42; r=$?; set -e; }
{ set +e; ./exit-42; r=$?; set_min_e; }
[ $r != 42 ] && echo " => $r"
[ $r == 42 ]
[ $r = 42 ]
trace "HEX2 ${srcdest}lib/$mes_cpu-mes/elf$mes_bits-0exit-42.hex2" $HEX2\
--LittleEndian\
@ -67,9 +74,9 @@ trace "HEX2 ${srcdest}lib/$mes_cpu-mes/elf$mes_bits-0exit-42.hex2" $HEX2\
-o 0exit-42
trace "TEST 0exit-42"
{ set +e; ./0exit-42; r=$?; set -e; }
{ set +e; ./0exit-42; r=$?; set_min_e; }
[ $r != 42 ] && echo " => $r"
[ $r == 42 ]
[ $r = 42 ]
trace "HEX2 ${srcdest}lib/$mes_cpu-mes/elf$mes_bits-body-exit-42.hex2" $HEX2\
--LittleEndian\
@ -82,9 +89,9 @@ trace "HEX2 ${srcdest}lib/$mes_cpu-mes/elf$mes_bits-body-exit-42.hex2" $HE
-o body-exit-42
trace "TEST body-exit-42"
{ set +e; ./body-exit-42; r=$?; set -e; }
{ set +e; ./body-exit-42; r=$?; set_min_e; }
[ $r != 42 ] && echo " => $r"
[ $r == 42 ]
[ $r = 42 ]
### FIXME: c&p from exit-42
trace "CCLD ${srcdest}lib/$mes_cpu-mes-$compiler/hello-mes.S" $CC\
@ -94,9 +101,9 @@ trace "CCLD ${srcdest}lib/$mes_cpu-mes-$compiler/hello-mes.S" $CC\
-o hello-mes
trace "TEST hello-mes"
{ set +e; ./hello-mes; r=$?; set -e; }
{ set +e; ./hello-mes; r=$?; set_min_e; }
[ $r != 0 ] && echo " => $r"
[ $r == 0 ]
[ $r = 0 ]
trace "HEX2 ${srcdest}lib/$mes_cpu-mes/elf$mes_bits-0hello-mes.hex2" $HEX2\
--LittleEndian\
@ -108,9 +115,9 @@ trace "HEX2 ${srcdest}lib/$mes_cpu-mes/elf$mes_bits-0hello-mes.hex2" $HEX2
-o 0hello-mes
trace "TEST 0hello-mes"
{ set +e; ./0hello-mes; r=$?; set -e; }
{ set +e; ./0hello-mes; r=$?; set_min_e; }
[ $r != 0 ] && echo " => $r"
[ $r == 0 ]
[ $r = 0 ]
trace "HEX2 ${srcdest}lib/$mes_cpu-mes/elf$mes_bits-body-hello-mes.hex2" $HEX2\
--LittleEndian\
@ -123,6 +130,6 @@ trace "HEX2 ${srcdest}lib/$mes_cpu-mes/elf$mes_bits-body-hello-mes.hex2" $
-o body-hello-mes
trace "TEST body-hello-mes"
{ set +e; ./body-hello-mes; r=$?; set -e; }
{ set +e; ./body-hello-mes; r=$?; set_min_e; }
[ $r != 0 ] && echo " => $r"
[ $r == 0 ]
[ $r = 0 ]

View file

@ -118,5 +118,5 @@ scaffold/boot/numbers.scm
XFAIL_TESTS=
test_ext=.scm
log_compiler=${srcdest}build-aux/test-boot.sh
log_compiler="${SHELL} ${srcdest}build-aux/test-boot.sh"
. ${srcdest}build-aux/test-suite.sh