1997-02-09 22:50:16 +00:00
|
|
|
#!/bin/sh
|
2005-12-30 11:34:54 +00:00
|
|
|
thistest=$1
|
2005-04-25 17:31:50 +00:00
|
|
|
format=$2
|
2005-12-30 11:34:54 +00:00
|
|
|
output=$3
|
|
|
|
tuning=$4
|
1997-02-09 22:50:16 +00:00
|
|
|
if [ -f /usr/ucb/touch ] ; then
|
|
|
|
TOUCH=/usr/ucb/touch
|
|
|
|
else
|
|
|
|
if [ -f /usr/bin/touch ] ; then
|
|
|
|
TOUCH=/usr/bin/touch
|
|
|
|
else
|
|
|
|
if [ -f /bin/touch ] ; then
|
|
|
|
TOUCH=/bin/touch
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
2005-12-30 11:34:54 +00:00
|
|
|
if [ "$tuning" != "" ] ; then
|
|
|
|
tuning="-T $tuning"
|
|
|
|
fi
|
|
|
|
echo "${thistest}...";
|
|
|
|
/bin/cp /dev/null results/${thistest}
|
1997-02-09 22:50:16 +00:00
|
|
|
( while read rule; do
|
2005-12-30 11:34:54 +00:00
|
|
|
echo "$rule" | ../ipftest -F $format -Rbr - -i input/${thistest} $tuning>> results/${thistest};
|
1997-02-09 22:50:16 +00:00
|
|
|
if [ $? -ne 0 ] ; then
|
|
|
|
exit 1;
|
|
|
|
fi
|
2005-12-30 11:34:54 +00:00
|
|
|
echo "--------" >> results/${thistest}
|
|
|
|
done ) < regress/${thistest}
|
|
|
|
cmp expected/${thistest} results/${thistest}
|
1997-02-09 22:50:16 +00:00
|
|
|
status=$?
|
|
|
|
if [ $status = 0 ] ; then
|
2005-12-30 11:34:54 +00:00
|
|
|
$TOUCH ${thistest}
|
1997-02-09 22:50:16 +00:00
|
|
|
fi
|
|
|
|
exit $status
|