diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2018-10-06 10:52:25 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2018-10-06 10:52:25 +0000 |
commit | 3f68be9023c782a09f7e1ca7b3996b8f9a0703dd (patch) | |
tree | 10f723461e798e6b4cffbd1fdcafeddf0ff0044d /regress/usr.sbin/syslogd/Makefile | |
parent | e9439c684413a43e0604a31a9b71d57757319799 (diff) |
Simplify regress tests by using the new setup and cleanup feature.
Diffstat (limited to 'regress/usr.sbin/syslogd/Makefile')
-rw-r--r-- | regress/usr.sbin/syslogd/Makefile | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/regress/usr.sbin/syslogd/Makefile b/regress/usr.sbin/syslogd/Makefile index 7b4874a9c17..91a2beac6ef 100644 --- a/regress/usr.sbin/syslogd/Makefile +++ b/regress/usr.sbin/syslogd/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.23 2018/04/11 19:00:54 bluhm Exp $ +# $OpenBSD: Makefile,v 1.24 2018/10/06 10:52:24 bluhm Exp $ # The following ports must be installed for the regression tests: # p5-IO-Socket-INET6 object interface for AF_INET and AF_INET6 domain sockets @@ -36,7 +36,7 @@ TARGETS ?= ${ARGS} .else TARGETS ?= ${ARGS:Nargs-rsyslog*} .endif -REGRESS_TARGETS = ${TARGETS:S/^/run-regress-/} +REGRESS_TARGETS = ${TARGETS:S/^/run-/} LDFLAGS += -lutil CLEANFILES += *.log *.log.? *.conf ktrace.out stamp-* CLEANFILES += *.out *.sock *.ktrace *.fstat ttylog *.ph */*.ph @@ -44,15 +44,16 @@ CLEANFILES += *.pem *.req *.key *.crt *.srl empty toobig diskimage .MAIN: all -.if make (regress) || make (all) -.BEGIN: - @echo +REGRESS_SETUP_ONCE += setup +setup: + @echo '\n======== $@ ========' [ -z "${SUDO}" ] || ${SUDO} true ${SUDO} /etc/rc.d/syslogd stop -.END: - @echo - ${SUDO} /etc/rc.d/syslogd restart -.endif + +REGRESS_CLEANUP += cleanup +cleanup: + @echo '\n======== $@ ========' + -${SUDO} /etc/rc.d/syslogd restart # Set variables so that make runs with and without obj directory. # Only do that if necessary to keep visible output short. @@ -69,7 +70,7 @@ PERLPATH = ${.CURDIR}/ # test parameters. Generally they consist of client, syslogd, server. .for a in ${ARGS} -run-regress-$a: $a +run-$a: $a @echo '\n======== $@ ========' time SUDO=${SUDO} KTRACE=${KTRACE} SYSLOGD=${SYSLOGD} perl ${PERLINC} ${PERLPATH}syslogd.pl ${PERLPATH}$a .endfor @@ -124,7 +125,6 @@ unconfig: -umount -f /dev/vnd0c 2>/dev/null || true -rmdir /mnt/regress-syslogd 2>/dev/null || true -vnconfig -u vnd0 2>/dev/null || true - -rm -f stamp-filesystem stamp-filesystem: @echo '\n======== $@ ========' @@ -132,11 +132,12 @@ stamp-filesystem: ${SUDO} chmod 1777 /mnt/regress-syslogd date >$@ -REGRESS_TARGETS += cleanup-filesystem +REGRESS_CLEANUP += cleanup-filesystem cleanup-filesystem: @echo '\n======== $@ ========' - ${SUDO} umount /mnt/regress-syslogd - ${SUDO} ${.MAKE} -C ${.CURDIR} unconfig + rm -f stamp-filesystem + -${SUDO} umount /mnt/regress-syslogd + -${SUDO} ${.MAKE} -C ${.CURDIR} unconfig ${REGRESS_TARGETS:M*filesystem*}: stamp-filesystem ${REGRESS_TARGETS:M*tls*}: client.crt server.crt 127.0.0.1.crt |