]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - contrib/ipfilter/test/mtest
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / contrib / ipfilter / test / mtest
1 #!/bin/sh
2 format=$2
3 mkdir -p results
4 # multiple rules at the same time
5
6 if [ -f /usr/ucb/touch ] ; then
7         TOUCH=/usr/ucb/touch
8 else
9         if [ -f /usr/bin/touch ] ; then
10                 TOUCH=/usr/bin/touch
11         else
12                 if [ -f /bin/touch ] ; then
13                         TOUCH=/bin/touch
14                 fi
15         fi
16 fi
17 echo "$1...";
18
19 /bin/cp /dev/null results/$1
20
21 ../ipftest -F $format -Rbr regress/$1 -i input/$1 > results/$1
22 if [ $? -ne 0 ] ; then
23         exit 1
24 fi
25 echo "--------" >> results/$1
26
27 cmp expected/$1 results/$1
28 status=$?
29 if [ $status -ne 0 ] ; then
30         exit $status
31 fi
32 cmp expected/$1 results/$1
33 status=$?
34 if [ $status -ne 0 ] ; then
35         exit $status
36 fi
37 $TOUCH $1
38 exit 0