Page MenuHomec4science

runtests
No OneTemporary

File Metadata

Created
Wed, Nov 13, 17:13

runtests

#!/bin/sh
for e in ../bin/*; do
c=$(basename $e);
if [ -f $c.out ]; then #run only if reference output file exists.
echo -ne "\n*** Running $c ... "
temp=$c.$$
if [ -f $c.in ]; then
$e < $c.in | grep -v 'time (s)' | grep -v 'Memory used' > $temp
else
$e | grep -v 'time (s)' | grep -v 'Memory used' > $temp
fi
diff -w $c.out $temp >/dev/null
stat=$?
if [ $stat -eq 1 ]; then
echo "test failed! ***"
echo "*** Diff of $c.out $temp ***"
diff -w $c.out $temp
else
echo "test passed! ***"
fi
rm $temp
fi
done

Event Timeline