]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - contrib/ipfilter/test/dotest6
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / contrib / ipfilter / test / dotest6
1 #!/bin/sh
2 format=$2
3 mkdir -p results
4 if [ -f /usr/ucb/touch ] ; then
5         TOUCH=/usr/ucb/touch
6 else
7         if [ -f /usr/bin/touch ] ; then
8                 TOUCH=/usr/bin/touch
9         else
10                 if [ -f /bin/touch ] ; then
11                         TOUCH=/bin/touch
12                 fi
13         fi
14 fi
15 echo "$1...";
16 /bin/cp /dev/null results/$1
17 ../ipftest -6 -r /dev/null -i /dev/null >/dev/null 2>&1
18 if [ $? -ne 0 ] ; then
19         echo "skipping IPv6 tests"
20         $TOUCH $1
21         exit 0
22 fi
23 ( while read rule; do
24         echo "$rule" | ../ipftest -F $format -6br - -i input/$1 >> results/$1;
25         if [ $? -ne 0 ] ; then
26                 exit 1;
27         fi
28         echo "--------" >> results/$1
29 done ) < regress/$1
30 cmp expected/$1 results/$1
31 status=$?
32 if [ $status = 0 ] ; then
33         $TOUCH $1
34 fi
35 exit $status