]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - contrib/ipfilter/test/ptest
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / contrib / ipfilter / test / ptest
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 if [ -f regress/$1.pool ] ; then
17         ../ipftest -RD -b -P regress/$1.pool -r regress/$1.ipf -i input/$1 >> \
18                 results/$1
19 else
20         ../ipftest -RD -b -r regress/$1.ipf -i input/$1 >> results/$1
21 fi
22 if [ $? -ne 0 ] ; then
23         exit 1;
24 fi
25 echo "-------------------------------" >> results/$1
26 cmp expected/$1 results/$1
27 status=$?
28 if [ $status = 0 ] ; then
29         $TOUCH $1
30 fi
31 exit $status