git: b725b1d73988 - main - editors/retext: Improve tests
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 12 Jan 2025 11:06:32 UTC
The branch main has been updated by eduardo:
URL: https://cgit.FreeBSD.org/ports/commit/?id=b725b1d73988e8288a7d95d0b2ccd27cc3de82bd
commit b725b1d73988e8288a7d95d0b2ccd27cc3de82bd
Author: Nuno Teixeira <eduardo@FreeBSD.org>
AuthorDate: 2025-01-12 10:58:08 +0000
Commit: Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2025-01-12 11:05:10 +0000
editors/retext: Improve tests
Use display:test instead of reinventing the wheel...
Thank you, jbeich@, for informing me about this useful feature.
---
editors/retext/Makefile | 17 ++++-------------
1 file changed, 4 insertions(+), 13 deletions(-)
diff --git a/editors/retext/Makefile b/editors/retext/Makefile
index de6637ec2dd8..8a5a983e5d0e 100644
--- a/editors/retext/Makefile
+++ b/editors/retext/Makefile
@@ -1,5 +1,6 @@
PORTNAME= ReText
DISTVERSION= 8.1.0
+PORTREVISION= 1
CATEGORIES= editors
MASTER_SITES= PYPI
DISTNAME= retext-${DISTVERSION}
@@ -19,23 +20,13 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}docutils>=0:textproc/py-docutils@${PY_FLAVOR
${PYTHON_PKGNAMEPREFIX}markups>=4.0.0:textproc/py-markups@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pygments>=0:textproc/py-pygments@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}python-markdown-math>=0.6:textproc/py-python-markdown-math@${PY_FLAVOR}
-TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pymdown-extensions>0:textproc/py-pymdown-extensions@${PY_FLAVOR} \
- ${PYTHON_PKGNAMEPREFIX}pytest>=0:devel/py-pytest@${PY_FLAVOR} \
- Xvfb:x11-servers/xorg-server@xvfb
+TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pymdown-extensions>0:textproc/py-pymdown-extensions@${PY_FLAVOR}
-USES= desktop-file-utils pyqt:6 python:3.9+ qt:6
+USES= desktop-file-utils display:test pyqt:6 python:3.9+ qt:6
USE_PYQT= pyqt6:run
-USE_PYTHON= autoplist noflavors pep517
+USE_PYTHON= autoplist noflavors pep517 pytest
USE_QT= tools:build
NO_ARCH= yes
-# Run tests in Xvfb using an approach to upstream CI:
-# https://github.com/retext-project/retext/blob/2ef7142e9422e8423e168a7ab30f8e491510f9b6/.github/workflows/main.yml#L59
-# run: xvfb-run -a -s "-screen 0 1024x768x24" python -m unittest discover -s tests -v
-do-test:
- Xvfb :1 -screen 0 1024x768x24 & \
- cd ${WRKSRC} && ${SETENV} DISPLAY=:1 ${PYTHON_CMD} -m pytest -rs -v ; \
- killall -v Xvfb
-
.include <bsd.port.mk>