summaryrefslogtreecommitdiffstats
path: root/contrib/ipfilter/test/dotest
blob: 71c09b7b816e63129ae204fc104c71911d6b0c21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh
name=$1
format=$2
output=$3
tuning=$4

. ./ipflib.sh

test_init

if [ "$tuning" != "" ] ; then
	case $tuning in
	-*)
		;;
	*)
		tuning="-T $tuning"
		;;
	esac
fi
echo "${name}...";
n=1
/bin/cp /dev/null results/${name}
( while read rule; do
	set_core $name $n
	echo "$rule" | ../ipftest -F $format -Rbr - -i input/${name} $tuning>> results/${name} &
	back=$!
	wait $back
	test_end_leak $?
	n=`expr $n + 1`
	echo "--------" >> results/${name}
done ) < regress/${name}
check_results $name
exit $status
OpenPOWER on IntegriCloud