HAMMER: MFC to 2.0
[dragonfly.git] / contrib / ipfilter / test / dotest
blob4b02bfa0357f492a22f75dff62f0e24551ec46e0
1 #!/bin/sh
2 if [ -f /usr/ucb/touch ] ; then
3 TOUCH=/usr/ucb/touch
4 else
5 if [ -f /usr/bin/touch ] ; then
6 TOUCH=/usr/bin/touch
7 else
8 if [ -f /bin/touch ] ; then
9 TOUCH=/bin/touch
13 echo "$1...";
14 /bin/cp /dev/null results/$1
15 ( while read rule; do
16 echo "$rule" | ipftest -br - -i input/$1 >> results/$1;
17 if [ $? -ne 0 ] ; then
18 exit 1;
20 echo "--------" >> results/$1
21 done ) < regress/$1
22 cmp expected/$1 results/$1
23 status=$?
24 if [ $status = 0 ] ; then
25 $TOUCH $1
27 exit $status