1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
#!/bin/sh
set -e
announce(){
echo
echo "============== $*"
echo
}
announce 'run-gforth-tests starting'
testfiles='checkans.fs coremore.fs dbltest.fs deferred.fs float.fs gforth.fs gforth-nofast.fs libcc.fs other.fs search.fs signals.fs tester.fs ttester.fs'
tester=`dpkg-query -L gforth-common | egrep -e 'test/tester\.fs$'`
if [ -z "$tester" ] || [ ! -f "$tester" ]; then
echo 'Could not find test/tester.fs in gforth-common' 1>&2
exit 1
fi
testdir=`dirname -- "$tester"`
cd -- "$testdir"
announce "run-gforth-tests running in $testdir"
for f in $testfiles; do
announce "testing $f"
gforth "$f" -e bye
done
announce "testing postpone.fs"
printf 'require tester.fs\nrequire coretest.fs\nrequire postpone.fs\nbye\n' | gforth
announce "looks like we're done"
|