1# $OpenBSD: Makefile,v 1.20 2022/11/09 14:31:31 claudio Exp $
2
3REGRESS_TARGETS	= 	network_statement md5 ovs mrt pftable \
4			maxprefix maxprefixout maxcomm \
5			as0 med eval_all policy l3vpn
6
7BGPD ?=			/usr/sbin/bgpd
8
9CLEANFILES +=		*.mrt *.out exabgp.*.conf *.log *.fifo \
10			api-exabgp api-exabgp.d
11
12api-exabgp: api-exabgp.c
13
14network_statement:
15	${SUDO} ksh ${.CURDIR}/$@.sh ${BGPD} ${.CURDIR} 11 12 pair11 pair12
16
17md5:
18	${SUDO} ksh ${.CURDIR}/$@.sh ${BGPD} ${.CURDIR} 11 12 pair11 pair12
19
20ovs:
21	${SUDO} ksh ${.CURDIR}/$@.sh ${BGPD} ${.CURDIR} 11 12 pair11 pair12
22
23policy:
24	${SUDO} ksh ${.CURDIR}/$@.sh ${BGPD} ${.CURDIR} 11 12 pair11 pair12
25
26pftable:
27	${SUDO} ksh ${.CURDIR}/$@.sh ${BGPD} ${.CURDIR} 11 12 pair11 pair12
28
29mrt:
30	${SUDO} ksh ${.CURDIR}/$@.sh ${BGPD} ${.CURDIR} 11
31
32maxprefix:
33	${SUDO} ksh ${.CURDIR}/$@.sh ${BGPD} ${.CURDIR} 11 12 pair11 pair12
34
35maxprefixout:
36	${SUDO} ksh ${.CURDIR}/$@.sh ${BGPD} ${.CURDIR} 11 12 pair11 pair12
37
38maxcomm:
39	${SUDO} ksh ${.CURDIR}/$@.sh ${BGPD} ${.CURDIR} 11 12 pair11 pair12
40
41l3vpn:
42	${SUDO} ksh ${.CURDIR}/$@.sh ${BGPD} ${.CURDIR} 11 12 pair11 pair12 13 14
43
44.if ! exists(/usr/local/bin/exabgp)
45as0:
46	# install exabgp from ports for additional tests
47	@echo SKIPPED
48
49med:
50	# install exabgp from ports for additional tests
51	@echo SKIPPED
52
53eval_all:
54	# install exabgp from ports for additional tests
55	@echo SKIPPED
56.else
57
58.SUFFIXES: .conf .in
59.in.conf:
60	sed -e 's|##OBJDIR##|${.OBJDIR}|g' \
61	    ${.IMPSRC} > ${.TARGET} || \
62	(rm ${.TARGET} && exit 1)
63
64as0: api-exabgp exabgp.as0.test1.conf exabgp.as0.test2.conf
65	${SUDO} ksh ${.CURDIR}/$@.sh ${BGPD} ${.CURDIR} 11 12 pair11 pair12
66
67med: api-exabgp exabgp.med.conf
68	${SUDO} ksh ${.CURDIR}/$@.sh ${BGPD} ${.CURDIR} 11 12 pair11 pair12
69
70eval_all: api-exabgp exabgp.eval_all.conf
71	${SUDO} ksh ${.CURDIR}/$@.sh ${BGPD} ${.CURDIR} 11 12 pair11 pair12
72
73.endif
74
75.include <bsd.regress.mk>
76