]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - contrib/ipfilter/test/itest
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / contrib / ipfilter / test / itest
1 #!/bin/sh
2 mkdir -p results
3 if [ -f /usr/ucb/touch ] ; then
4         TOUCH=/usr/ucb/touch
5 else
6         if [ -f /usr/bin/touch ] ; then
7                 TOUCH=/usr/bin/touch
8         else
9                 if [ -f /bin/touch ] ; then
10                         TOUCH=/bin/touch
11                 fi
12         fi
13 fi
14 echo "$1...";
15 /bin/cp /dev/null results/$1
16 case $3 in
17 ipf)
18         ../ipf -Rnvf regress/$1 2>/dev/null > results/$1
19         ;;
20 ipftest)
21         ../ipftest -D -r regress/$1 -i /dev/null > results/$1
22         ;;
23 esac
24 cmp expected/$1 results/$1
25 status=$?
26 if [ $status = 0 ] ; then
27         $TOUCH $1
28 fi
29 exit $status