summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhenning <henning@openbsd.org>2002-07-06 17:08:41 +0000
committerhenning <henning@openbsd.org>2002-07-06 17:08:41 +0000
commit488e63f3bc71399d711509d7f47fc6e13ce3a022 (patch)
treea9c5c0d17d399eda82cf6919dab9491dfe774b7b
parentFix typo in get_get_files_list() that prevented sets from (diff)
downloadwireguard-openbsd-488e63f3bc71399d711509d7f47fc6e13ce3a022.tar.xz
wireguard-openbsd-488e63f3bc71399d711509d7f47fc6e13ce3a022.zip
use sbin/pfctl/${__objdir}/pfctl for regression tests if existant, fall
back to pfctl in path otherwise. will save my ass sooner or later. ok millert@, pb@
-rw-r--r--regress/sbin/pfctl/Makefile16
1 files changed, 13 insertions, 3 deletions
diff --git a/regress/sbin/pfctl/Makefile b/regress/sbin/pfctl/Makefile
index 1a80a6f7876..6663649c8d2 100644
--- a/regress/sbin/pfctl/Makefile
+++ b/regress/sbin/pfctl/Makefile
@@ -1,13 +1,23 @@
-# $OpenBSD: Makefile,v 1.20 2002/06/25 08:17:16 henning Exp $
+# $OpenBSD: Makefile,v 1.21 2002/07/06 17:08:41 henning Exp $
+
+.include <bsd.obj.mk>
PFTESTS=1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
PFFAIL=1 2 3 4 5 6 7 8 9 10 11
+PFDIR=${.CURDIR}/../../../sbin/pfctl/${__objdir}/
+
.for n in ${PFFAIL}
REGRESSTARGETS+=pfail${n}
+.BEGIN:
+.if !exists(${PFDIR}pfctl)
+.undef PFDIR
+
+.endif
+
pfail${n}:
- if pfctl -nv -f - < ${.CURDIR}/pfail${n}.in > /dev/null 2>&1 ; then \
+ if ${PFDIR}pfctl -nv -f - < ${.CURDIR}/pfail${n}.in > /dev/null 2>&1 ; then \
false ; \
fi
@@ -17,7 +27,7 @@ pfail${n}:
REGRESSTARGETS+=pf${n}
pf${n}:
- pfctl -nv -f - < ${.CURDIR}/pf${n}.in | \
+ ${PFDIR}pfctl -nv -f - < ${.CURDIR}/pf${n}.in | \
cmp -s ${.CURDIR}/pf${n}.ok /dev/stdin
.endfor