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