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 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
#! /bin/sh
rc=0
autoquit=
valgrind=
vopt=
while [ $# -gt 0 ] ; do
case $1 in
valgrind) valgrind=valgrind; vopt=-q;;
autoquit) autoquit=autoquit;;
esac
shift
done
/bin/rm -f test.*
/bin/rm -f test-*
echo "*** Running distributed tests ***"
for x in infiles/* ; do
file=`basename $x`
$valgrind $vopt ../src/pmw -norc -testing -F ../fontmetrics -H ../PSheader \
-MF ../psfonts -SM ../macros -o test.ps infiles/$file
diff -u outfiles/$file.ps test.ps >test.diff
if [ $? != 0 ] ; then
mv test.diff test-$file.diff
echo "*** $file test failed - see test-$file.diff ***"
if [ "$autoquit" = "autoquit" ]; then exit 1; fi
rc=1
else
echo $file test succeeded
fi
done
# If all is well and we are in a development environment where the wider set of
# tests is available, run them too.
if [ $rc = 0 ]; then
/bin/rm -f test.*
/bin/rm -f test-*
if [ -x ../testing/RunTests ]; then
(cd ../testing; ./RunTests $autoquit $valgrind)
rc=$?
fi
fi
exit $rc
# End
|