diff options
author | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2004-02-18 20:15:50 +0000 |
---|---|---|
committer | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2004-02-18 20:15:50 +0000 |
commit | 587aa05cd3748d9fe912dda7a8abea00c50f9ccb (patch) | |
tree | a859283f3aa35052462eeabb4134d1bbc70266d2 | |
parent | d150e90ee344556c56213b9d16e19a5ccc14a05c (diff) |
Make sure interface cleanup and setup are only run once, and clean up if we
interrupt the tests. ok henning@
-rw-r--r-- | regress/sbin/pfctl/Makefile | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/regress/sbin/pfctl/Makefile b/regress/sbin/pfctl/Makefile index 77860eb39f6..acb640ddba2 100644 --- a/regress/sbin/pfctl/Makefile +++ b/regress/sbin/pfctl/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.175 2004/02/11 04:17:18 mcbride Exp $ +# $OpenBSD: Makefile,v 1.176 2004/02/18 20:15:49 mcbride Exp $ # TARGETS # pf: feed pfNN.in through pfctl and check wether the output matches pfNN.ok @@ -30,7 +30,10 @@ PFTABLE=1 2 3 4 5 6 7 8 9 10 11 12 13 PFOPT=1 2 3 4 5 PFIF2IP=1 2 3 +.MAIN: all + .ifmake !obj && !clean && !cleandir && !depend && !regress +.if (${.TARGET} != all && ! make(all)) || (${.TARGET} == all) .BEGIN: -${SUDO} ifconfig lo1000000 create -${SUDO} ifconfig tun1000000 create @@ -40,6 +43,12 @@ PFIF2IP=1 2 3 -${SUDO} ifconfig lo1000000 destroy -${SUDO} ifconfig tun1000000 destroy -${SUDO} ifconfig tun1000001 destroy + +.INTERRUPT: + -${SUDO} ifconfig lo1000000 destroy + -${SUDO} ifconfig tun1000000 destroy + -${SUDO} ifconfig tun1000001 destroy +.endif .endif .for n in ${PFFAIL} |