build: Support building with Gash.
* build-aux/check-mes.sh: Replace unspported $((..)) by $(expr ...). * build-aux/check-mescc.sh: Likewise. * build-aux/check-tcc.sh: Likewise.
This commit is contained in:
parent
d7159d607a
commit
da1c529bb4
|
@ -66,14 +66,14 @@ for t in $tests; do
|
|||
echo $t: [SKIP];
|
||||
continue
|
||||
fi
|
||||
${top_builddir}/pre-inst-env sh "$t" &> $t.${mes}log
|
||||
${top_builddir}/pre-inst-env sh "$t" > $t.${mes}log 2>&1
|
||||
r=$?
|
||||
total=$((total+1))
|
||||
total=$(expr $total + 1)
|
||||
if [ $r = 0 ]; then
|
||||
echo $t: [${mes}OK]
|
||||
else
|
||||
echo $t: [${mes}FAIL]
|
||||
fail=$((fail+1))
|
||||
fail=$(expr $fail + 1)
|
||||
fi
|
||||
done
|
||||
if [ $fail != 0 ]; then
|
||||
|
|
|
@ -248,21 +248,21 @@ for t in $tests; do
|
|||
else
|
||||
libc='-l c'
|
||||
fi
|
||||
sh $test_sh "$t" &> "$t".log
|
||||
sh $test_sh "$t" > "$t".log 2>&1
|
||||
r=$?
|
||||
total=$((total+1))
|
||||
total=$(expr $total + 1)
|
||||
if [ $r = 0 ]; then
|
||||
echo $t: [OK]
|
||||
pass=$((pass+1))
|
||||
pass=$(expr $pass + 1)
|
||||
else
|
||||
echo $t: [FAIL]
|
||||
fail=$((fail+1))
|
||||
fail=$(expr $fail + 1)
|
||||
fi
|
||||
done
|
||||
|
||||
[ $expect != 0 ] && echo "expect: $expect"
|
||||
[ $fail != 0 ] && echo "failed: $fail"
|
||||
[ $fail -lt $expect ] && echo "solved: $(($expect - $fail))"
|
||||
[ $fail -lt $expect ] && echo "solved: $(expr $expect - $fail)"
|
||||
echo "passed: $pass"
|
||||
echo "total: $total"
|
||||
if [ $fail != 0 -a $fail -gt $expect ]; then
|
||||
|
|
|
@ -135,20 +135,20 @@ for t in $tests; do
|
|||
continue;
|
||||
fi
|
||||
cp $TINYCC_PREFIX/tests/tests2/$i* scaffold/tinycc
|
||||
sh ${srcdest}build-aux/test.sh "scaffold/tinycc/$t" &> scaffold/tinycc/"$t".log
|
||||
sh ${srcdest}build-aux/test.sh "scaffold/tinycc/$t" > scaffold/tinycc/"$t".log 2>&1
|
||||
r=$?
|
||||
total=$((total+1))
|
||||
total=$(expr $total + 1)
|
||||
if [ $r = 0 ]; then
|
||||
echo $t: [OK]
|
||||
pass=$((pass+1))
|
||||
pass=$(expr $pass + 1)
|
||||
else
|
||||
echo $t: [FAIL]
|
||||
fail=$((fail+1))
|
||||
fail=$(expr $fail + 1)
|
||||
fi
|
||||
done
|
||||
[ $expect != 0 ] && echo "expect: $expect"
|
||||
[ $fail != 0 ] && echo "failed: $fail"
|
||||
[ $fail -lt $expect ] && echo "solved: $(($expect - $fail))"
|
||||
[ $fail -lt $expect ] && echo "solved: $(expr $expect - $fail)"
|
||||
echo "passed: $pass"
|
||||
echo "total: $total"
|
||||
if [ $fail != 0 -a $fail -gt $expect ]; then
|
||||
|
|
|
@ -25,8 +25,8 @@ set -e
|
|||
. ${srcdest}build-aux/trace.sh
|
||||
|
||||
./pre-inst-env bash ${srcdest}build-aux/check-boot.sh
|
||||
./pre-inst-env bash ${srcdest}build-aux/check-mes.sh
|
||||
./pre-inst-env bash ${srcdest}build-aux/check-mescc.sh
|
||||
./pre-inst-env sh ${srcdest}build-aux/check-mes.sh
|
||||
./pre-inst-env sh ${srcdest}build-aux/check-mescc.sh
|
||||
if [ -d $TINYCC_PREFIX/tests/tests2 ] ;then
|
||||
./pre-inst-env bash ${srcdest}build-aux/check-tcc.sh
|
||||
./pre-inst-env sh ${srcdest}build-aux/check-tcc.sh
|
||||
fi
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#! /bin/sh
|
||||
|
||||
# GNU Mes --- Maxwell Equations of Software
|
||||
# Copyright © 2017,2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
# Copyright © 2017,2018,2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
||||
#
|
||||
# This file is part of GNU Mes.
|
||||
#
|
||||
|
@ -25,7 +25,7 @@ set -e
|
|||
mes_prefix=@prefix@/share/mes
|
||||
|
||||
# use bash or lose if pipes fail
|
||||
if [ "$(basename $SHELL)" == bash ]; then
|
||||
if [ "$(basename $SHELL)" = bash ]; then
|
||||
set -o pipefail
|
||||
fi
|
||||
|
||||
|
@ -39,7 +39,7 @@ cp scripts/mescc $DESTDIR@bindir@/mescc
|
|||
sed \
|
||||
-e "s,^#! /bin/sh,#! @SHELL@," \
|
||||
scripts/diff.scm > $DESTDIR@bindir@/diff.scm
|
||||
chmod -w+x $DESTDIR@bindir@/diff.scm
|
||||
chmod +x $DESTDIR@bindir@/diff.scm
|
||||
|
||||
mkdir -p $DESTDIR@docdir@
|
||||
|
||||
|
|
Loading…
Reference in a new issue