diff options
author | 2017-01-26 02:06:37 +0000 | |
---|---|---|
committer | 2017-01-26 02:06:37 +0000 | |
commit | 0e56b181d238c0059099fc6fe2e717e47bd72173 (patch) | |
tree | bcf2ba125096126f6910252353212901ac83487f | |
parent | Allocate the mbuf before the netlock. While here, move the setting of (diff) | |
download | wireguard-openbsd-0e56b181d238c0059099fc6fe2e717e47bd72173.tar.xz wireguard-openbsd-0e56b181d238c0059099fc6fe2e717e47bd72173.zip |
Each entry in REGRESS_TARGETS is run in a separate make process, so the
.END target will kill ldapd after each one. To compensate, make each test
target depend on bootstrap to ensure ldapd is running. In .END, remove the
pid file after killing ldapd so reduce noise.
-rw-r--r-- | regress/usr.sbin/ldapd/Makefile | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/regress/usr.sbin/ldapd/Makefile b/regress/usr.sbin/ldapd/Makefile index 93080e84fba..e01d056924d 100644 --- a/regress/usr.sbin/ldapd/Makefile +++ b/regress/usr.sbin/ldapd/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.5 2016/09/28 18:00:01 bluhm Exp $ +# $OpenBSD: Makefile,v 1.6 2017/01/26 02:06:37 jmatthew Exp $ OUT=${.CURDIR}/out DIT=dc=example,dc=com @@ -18,7 +18,7 @@ regress: @echo SKIPPED .endif -REGRESS_TARGETS = bootstrap connect import perl purge #cpan +REGRESS_TARGETS = connect import perl purge #cpan bootstrap: @[ -z "${SUDO}" ] || ${SUDO} true @@ -27,30 +27,31 @@ bootstrap: @${SUDO} ldapd -dvv -r ${.OBJDIR} -f ${.OBJDIR}/ldapd1.conf > ${.OBJDIR}/log 2>&1 & @sleep 1 @grep -a startup ${.OBJDIR}/log |sed -e 's/.*\[// ; s/\].*//' > ${.OBJDIR}/ldapd.pid + .END: - @[ -f ${.OBJDIR}/ldapd.pid ] && ${SUDO} kill $$(cat ${.OBJDIR}/ldapd.pid) + @[ -f ${.OBJDIR}/ldapd.pid ] && ${SUDO} kill $$(cat ${.OBJDIR}/ldapd.pid) && rm ${.OBJDIR}/ldapd.pid -connect: +connect: bootstrap -ldapsearch -x -H ldapi://%2ftmp%2fldapi | diff - ${OUT}/empty.log -ldapsearch -x -p 6639 -h localhost 2>&1 | diff - ${OUT}/empty.log -ldapsearch -x -p 6636 -h localhost 2>&1 | diff - ${OUT}/empty.log -import: +import: bootstrap ldapadd -f ${.CURDIR}/dit-example.ldif -Dcn=admin,${DIT} -x -w secret -h localhost -p 6639 | diff - ${OUT}/adding.log ldapsearch -x -b ${DIT} -h localhost -p 6639 | diff - ${OUT}/example.log ldapsearch -x -D cn=admin,${DIT} -w secret -b ${DIT} -h localhost -p 6639 | diff - ${OUT}/example.log -purge: import +purge: bootstrap ldapdelete -Dcn=admin,${DIT} -x -w secret -h localhost -p 6639 -r ${DIT} -ldapsearch -x -p 6639 -h localhost 2>&1 | diff - ${OUT}/empty.log -perl: +perl: bootstrap @-perl ${.CURDIR}/run-tests.pl # run tests from Net::LDAP # requires all of databases/p5-ldap RUN_DEPENDS # tests above 41 fail because ldapd doesnt handle uppercase namespaces -cpan: +cpan: bootstrap tar -C ${.OBJDIR} -xzf /usr/ports/distfiles/perl-ldap-${NLV}.tar.gz @${SUDO} install -m 600 -o root ${.CURDIR}/nldapd.conf ${.OBJDIR}/perl-ldap-${NLV} cp common.pl ${.OBJDIR}/perl-ldap-${NLV}/t |