devel/dbus-tcl: improve test target

This commit is contained in:
Pietro Cerutti 2016-04-11 13:33:20 +00:00
parent 95d2dd1967
commit ed03bd4e27
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=413031

View File

@ -19,6 +19,8 @@ OPTIONS_DEFINE= DOCS
DOCSDIR= ${PREFIX}/share/doc/dbus
PORTDOCS= *
TEST_TARGET= do-test
USES= pkgconfig tcl:85+
GNU_CONFIGURE= yes
CONFIGURE_ARGS+=--with-tcl=${TCL_LIBDIR} \
@ -32,7 +34,12 @@ post-patch:
${REINPLACE_CMD} -e '/^INSTALL_PROGRAM/s|$$| -s|' \
${WRKSRC}/Makefile.in
regression-test:
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} test
do-test:
DBUS=$$(${LOCALBASE}/bin/dbus-daemon --session --print-address --fork --print-pid); \
DBUS_ADDR=$$(echo $$DBUS | awk '{print $$1}'); \
DBUS_PID=$$(echo $$DBUS | awk '{print $$2}'); \
DBUS_ENV=DBUS_SESSION_BUS_ADDRESS=$$DBUS_ADDR; \
${SETENV} ${MAKE_ENV} $$DBUS_ENV ${MAKE} -C ${WRKSRC} test; \
kill $$DBUS_PID
.include <bsd.port.mk>