Makefile revision 1.18
1# $OpenBSD: Makefile,v 1.18 2006/04/12 14:07:11 hshoexer Exp $
2
3# TARGETS
4# ipsec: feed ipsecNN.in through ipsecctl and check wether the output matches
5# 	 ipsecNN.ok
6# tcpmd5: same as above, but for tcpmd5 rules
7# sa:	 same as above, but for SA rules.
8# ike:	 same as above, but for ike rules.
9
10IPSECTESTS=1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
11TCPMD5TESTS=1 2 3
12SATESTS=1 2 3 4 5 6 7 8 9 10 11 12
13SAFAIL=1
14IKETESTS=1 2 3 4 5 6 7 8 9 10
15
16SHELL=/bin/sh
17
18.MAIN: all
19
20.for n in ${IPSECTESTS}
21IPSEC_TARGETS+=ipsec${n}
22
23ipsec${n}:
24	cat ${.CURDIR}/ipsec${n}.in | sed -e 's,DIR,${.CURDIR},g' | \
25	    ipsecctl -nv -f - | diff -u ${.CURDIR}/ipsec${n}.ok /dev/stdin
26.endfor
27
28.for n in ${TCPMD5TESTS}
29TCPMD5_TARGETS+=tcpmd5${n}
30
31tcpmd5${n}:
32	cat ${.CURDIR}/tcpmd5${n}.in | sed -e 's,DIR,${.CURDIR},g' | \
33	    ipsecctl -nv -f - | diff -u ${.CURDIR}/tcpmd5${n}.ok /dev/stdin
34.endfor
35
36.for n in ${SATESTS}
37SA_TARGETS+=sa${n}
38
39sa${n}:
40	cat ${.CURDIR}/sa${n}.in | sed -e 's,DIR,${.CURDIR},g' | \
41	    ipsecctl -nv -f - | diff -u ${.CURDIR}/sa${n}.ok /dev/stdin
42.endfor
43
44.for n in ${SAFAIL}
45SAFAIL_TARGETS+=safail${n}
46
47safail${n}:
48	cat ${.CURDIR}/safail${n}.in | sed -e 's,DIR,${.CURDIR},g' | \
49	    ipsecctl -nv -f - 2>&1 | diff -u ${.CURDIR}/safail${n}.ok /dev/stdin
50.endfor
51
52.for n in ${IKETESTS}
53IKE_TARGETS+=ike${n}
54
55ike${n}:
56	cat ${.CURDIR}/ike${n}.in | sed -e 's,DIR,${.CURDIR},g' | \
57	    ipsecctl -nv -f - | diff -u ${.CURDIR}/ike${n}.ok /dev/stdin
58.endfor
59
60ipsec:		${IPSEC_TARGETS}
61REGRESS_TARGETS+=ipsec
62
63tcpmd5:		${TCPMD5_TARGETS}
64REGRESS_TARGETS+=tcpmd5
65
66sa:		${SA_TARGETS}
67REGRESS_TARGETS+=sa
68
69safail:		${SAFAIL_TARGETS}
70REGRESS_TARGETS+=safail
71
72ike:		${IKE_TARGETS}
73REGRESS_TARGETS+=ike
74
75alltests: ${REGRESS_TARGETS}
76
77.PHONY: ${REGRESS_TARGETS}
78
79.include <bsd.regress.mk>
80