git: 7e5bafe0f1b9 - main - archivers/py-zopfli: Add make test

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Fri, 25 Mar 2022 17:20:17 UTC
The branch main has been updated by sunpoet:

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

commit 7e5bafe0f1b95ae995ea9d59743519b368764b5b
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-03-25 17:15:23 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-03-25 17:19:23 +0000

    archivers/py-zopfli: Add make test
---
 archivers/py-zopfli/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/archivers/py-zopfli/Makefile b/archivers/py-zopfli/Makefile
index a7c0f2433f72..be1fd65fe33b 100644
--- a/archivers/py-zopfli/Makefile
+++ b/archivers/py-zopfli/Makefile
@@ -13,6 +13,7 @@ LICENSE=	APACHE20
 LICENSE_FILE=	${WRKSRC}/COPYING
 
 BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}setuptools_scm>=0:devel/py-setuptools_scm@${PY_FLAVOR}
+TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pytest>=0,1:devel/py-pytest@${PY_FLAVOR}
 
 USES=		python:3.7+ zip
 USE_PYTHON=	autoplist concurrent distutils
@@ -20,4 +21,7 @@ USE_PYTHON=	autoplist concurrent distutils
 post-install:
 	${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name '*.so' -exec ${STRIP_CMD} {} +
 
+do-test:
+	cd ${WRKSRC} && ${SETENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} ${PYTHON_CMD} -m pytest -rs -v
+
 .include <bsd.port.mk>