blob: 493f18b43a83603593628e7e19b31f39dc599205 [file] [log] [blame] [raw]
#!/bin/sh
mode=$1
name=$2
input=$3
output=$4
n=1
. ./ipflib.sh
test_init
shift
if [ $output = hex ] ; then
format="-xF $input"
else
format="-F $input"
fi
shift
shift
shift
while [ $# -ge 1 ] ; do
l=`echo $1 | cut -c1`
if [ "$l" = "-" ] ; then
format="$format $1"
else
format="-T $1 $format"
fi
shift
done
case $mode in
single)
echo "$name...";
/bin/cp /dev/null results/$name
( while read rule; do
set_core $name $n
echo "$rule" | ../ipftest -R $format -b -r regress/$name.ipf -N - -i input/$name >> \
results/$name &
back=$!
wait $back
test_end_leak $?
n=`expr $n + 1`
echo "-------------------------------" >> results/$name
done ) < regress/$name.nat
check_results $name
;;
multi)
echo "$name...";
/bin/cp /dev/null results/$name
../ipftest -R $format -b -r regress/$name.ipf -N regress/$name.nat \
-i input/$name >> results/$name &
back=$!
wait $back
test_end_leak $?
echo "-------------------------------" >> results/$name
check_results $name
;;
esac
exit $status