Hi,

This enables the test target for vdirsyncer. The tests need two additional
python modules (see attachments).

In addition I reshuffled lines longer than 80 characters.

Thanks danj@ for the encouragement ;-)

Remi


Index: Makefile
===================================================================
RCS file: /cvs/ports/productivity/vdirsyncer/Makefile,v
retrieving revision 1.4
diff -u -p -r1.4 Makefile
--- Makefile    31 Aug 2017 16:30:23 -0000      1.4
+++ Makefile    3 Sep 2017 12:17:10 -0000
@@ -28,19 +28,30 @@ RUN_DEPENDS =               devel/py-atomicwrites${MO
                        devel/py-click-threading${MODPY_FLAVOR} \
                        www/py-requests-toolbelt${MODPY_FLAVOR}
 
+TEST_DEPENDS =          devel/py-hypothesis${MODPY_FLAVOR} \
+                        devel/py-test-localserver${MODPY_FLAVOR} \
+                        devel/py-test-subtesthack${MODPY_FLAVOR} \
+                        ${RUN_DEPENDS}
+
+
 post-build:
        cd ${WRKSRC}/docs; ${MAKE_ENV} PYTHONPATH=${WRKSRC} \
-               sphinx-build${MODPY_BIN_SUFFIX} -b html -d _build/doctrees . 
_build/html
+               sphinx-build${MODPY_BIN_SUFFIX} \
+               -b html -d _build/doctrees . _build/html
 
 post-install:
        ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/vdirsyncer
        ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/vdirsyncer
-       cd ${WRKSRC}; ${INSTALL_DATA} AUTHORS.rst CHANGELOG.rst 
CONTRIBUTING.rst \
-               ISSUE_TEMPLATE.md LICENSE README.rst 
${PREFIX}/share/doc/vdirsyncer
-       cd ${WRKSRC}/docs/_build/html && pax -rw * 
${PREFIX}/share/doc/vdirsyncer
+       cd ${WRKSRC}; ${INSTALL_DATA} AUTHORS.rst CHANGELOG.rst \
+               CONTRIBUTING.rst ISSUE_TEMPLATE.md LICENSE README.rst \
+               ${PREFIX}/share/doc/vdirsyncer
+       cd ${WRKSRC}/docs/_build/html && \
+               pax -rw * ${PREFIX}/share/doc/vdirsyncer
        ${INSTALL_DATA} ${WRKSRC}/config.example \
                ${PREFIX}/share/examples/vdirsyncer
 
-NO_TEST =              Yes
+do-test:
+       cd ${WRKSRC}; DAV_SERVER=skip DETERMINISTIC_TESTS=true \
+               ${MODPY_BIN} -m pytest tests/
 
 .include <bsd.port.mk>

Attachment: py-test-localserver.tgz
Description: application/tar-gz

Attachment: py-test-subtesthack.tgz
Description: application/tar-gz

Reply via email to