Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Nov 2023 17:14:44 GMT
From:      Yuri Victorovich <yuri@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: fd31d93d4b10 - main - www/wt: Add test target
Message-ID:  <202311021714.3A2HEiFV093898@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=fd31d93d4b10080231969559926f6c05183b6bc7

commit fd31d93d4b10080231969559926f6c05183b6bc7
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2023-11-02 17:12:17 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2023-11-02 17:14:42 +0000

    www/wt: Add test target
    
    ... instead of the TEST option.
    The test target now builds and runs tests.
    
    PR:             274872
    Approved by:    info@babaei.net (maintainer)
---
 www/wt/Makefile | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/www/wt/Makefile b/www/wt/Makefile
index c02321f3fe0b..98e60f5e30fb 100644
--- a/www/wt/Makefile
+++ b/www/wt/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	wt
 DISTVERSION=	4.8.0
-PORTREVISION=	4
+PORTREVISION=	5
 CATEGORIES=	www
 
 PATCH_SITES=	https://github.com/emweb/wt/commit/
@@ -17,7 +17,7 @@ LIB_DEPENDS=	libpng.so:graphics/png \
 		libboost_system.so:devel/boost-libs \
 		libGraphicsMagick.so:graphics/GraphicsMagick
 
-USES=		cmake compiler:c++14-lang cpe pkgconfig ssl
+USES=		cmake:testing compiler:c++14-lang cpe pkgconfig ssl
 USE_GITHUB=	yes
 GH_ACCOUNT=	emweb
 CPE_VENDOR=	emweb
@@ -35,11 +35,12 @@ CMAKE_ARGS=	-DCONFIGDIR:STRING=${LOCALBASE}/etc/${PORTNAME} \
 		-DWT_WRASTERIMAGE_IMPLEMENTATION:STRING=GraphicsMagick \
 		-DENABLE_SSL:BOOL=ON \
 		-DDESTDIR:STRING=${STAGEDIR}
+CMAKE_OFF=	BUILD_TESTS
+CMAKE_TESTING_ON=	BUILD_TESTS
 
 OPTIONS_DEFINE=	\
 	DEBUG \
 	EXAMPLES \
-	TESTS \
 	RESOURCES \
 	HARU \
 	PANGO \
@@ -49,7 +50,6 @@ OPTIONS_DEFINE=	\
 	LIBWTTEST \
 	UNWIND
 OPTIONS_DEFAULT=	\
-	TESTS \
 	RESOURCES \
 	HARU \
 	PANGO \
@@ -60,7 +60,6 @@ OPTIONS_SUB=	yes
 NO_OPTIONS_SORT=	yes
 
 EXAMPLES_DESC=		Install examples (implies SQLITE3 and WTHTTP)
-TESTS_DESC=		Build Wt tests
 RESOURCES_DESC=		Install resources directory
 HARU_DESC=		Enable Haru Free PDF Library
 SAML_DESC=		Build built-in SAML service provider for Wt::Auth
@@ -134,8 +133,6 @@ SQLITE3_CMAKE_BOOL=	ENABLE_SQLITE
 SQLITE3_USES=		sqlite:3
 SQLITE3_CMAKE_ON=	-DENABLE_LIBWTDBO:BOOL=ON
 
-TESTS_CMAKE_BOOL=	BUILD_TESTS
-
 UNWIND_CMAKE_BOOL=	ENABLE_UNWIND
 UNWIND_LIB_DEPENDS=	libunwind.so:devel/libunwind
 
@@ -168,4 +165,10 @@ post-install:
 	${INSTALL_DATA} ${BUILD_WRKSRC}/wt_config.xml \
 		${STAGEDIR}${ETCDIR}/wt_config.xml.sample
 
+do-test:
+	@cd ${WRKSRC}/test && \
+		${BUILD_WRKSRC}/test/test.wt && \
+		${BUILD_WRKSRC}/test/test.sqlite3 && \
+		${BUILD_WRKSRC}/test/test.http
+
 .include <bsd.port.mk>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202311021714.3A2HEiFV093898>