mirror of https://git.FreeBSD.org/ports.git
editors/retext: Improve tests
Use display:test instead of reinventing the wheel... Thank you, jbeich@, for informing me about this useful feature.
This commit is contained in:
parent
7949883bff
commit
b725b1d739
editors/retext
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue