diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2021-10-23 17:56:32 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2021-10-23 17:56:32 +0000 |
commit | 717c58216ffb027855025d18636b23f6519831a7 (patch) | |
tree | 0f2c920e2923169161145f3382a934ee58dcfaa6 /regress | |
parent | 03bcf87c861150591bea2f44c3768094e55e58d0 (diff) |
For testing snmpd, use rc script to stop any running snmpd on machine
and restart it afterwards.
Diffstat (limited to 'regress')
-rw-r--r-- | regress/usr.sbin/snmpd/Makefile | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/regress/usr.sbin/snmpd/Makefile b/regress/usr.sbin/snmpd/Makefile index 466a2cc93de..c8c575e8f57 100644 --- a/regress/usr.sbin/snmpd/Makefile +++ b/regress/usr.sbin/snmpd/Makefile @@ -1,9 +1,17 @@ -# $OpenBSD: Makefile,v 1.3 2021/10/11 05:46:14 anton Exp $ +# $OpenBSD: Makefile,v 1.4 2021/10/23 17:56:31 bluhm Exp $ # Regress tests for snmpd -REGRESS_TARGETS = run-regress-snmpd +REGRESS_SETUP_ONCE = setup +REGRESS_CLEANUP = cleanup +REGRESS_TARGETS = run-snmpd -run-regress-snmpd: +setup: + ${SUDO} /etc/rc.d/snmpd stop + +cleanup: + -${SUDO} /etc/rc.d/snmpd restart || true + +run-snmpd: ${SUDO} env OBJDIR=${.OBJDIR} sh ${.CURDIR}/snmpd.sh .include <bsd.regress.mk> |