git: 12d8f46d9b98 - main - sysutils/iocage: Add test target, no pytest-runner

Michael Gmelin grembo at FreeBSD.org
Tue Jul 20 09:18:12 UTC 2021


The branch main has been updated by grembo:

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

commit 12d8f46d9b985f987ede218e15a5789ff0ace5df
Author:     Michael Gmelin <grembo at FreeBSD.org>
AuthorDate: 2021-07-20 09:13:14 +0000
Commit:     Michael Gmelin <grembo at FreeBSD.org>
CommitDate: 2021-07-20 09:13:14 +0000

    sysutils/iocage: Add test target, no pytest-runner
    
    Move test dependencies to TEST_DEPENDS and add test target.
    Patch out pytest-runner locally.
    
    PR:             251447
    Reported by:    koobs
---
 sysutils/iocage/Makefile             |  8 +++++++-
 sysutils/iocage/files/patch-setup.py | 11 +++++++++++
 2 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/sysutils/iocage/Makefile b/sysutils/iocage/Makefile
index af3a47925b83..e1dba6cb42d6 100644
--- a/sysutils/iocage/Makefile
+++ b/sysutils/iocage/Makefile
@@ -15,7 +15,10 @@ COMMENT=	FreeBSD jail manager written in Python3
 LICENSE=	BSD2CLAUSE
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pytest-runner>=2.0.0:devel/py-pytest-runner@${PY_FLAVOR}
+TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}mock>0:devel/py-mock@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}pytest-cov>0:devel/py-pytest-cov@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}pytest-pep8>0:devel/py-pytest-pep8@${PY_FLAVOR}
 RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}netifaces>0:net/py-netifaces@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}click>=6.7:devel/py-click@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}tqdm>=4.10.0:misc/py-tqdm@${PY_FLAVOR} \
@@ -54,4 +57,7 @@ GIT_LITE_DESC=	depend on lite flavor of devel/git (bare minimum git experience)
 GIT_RUN_DEPENDS=git:devel/git
 GIT_LITE_RUN_DEPENDS=git:devel/git at lite
 
+do-test:
+	@cd ${WRKSRC} && ${PYTHON_CMD} -m pytest
+
 .include <bsd.port.mk>
diff --git a/sysutils/iocage/files/patch-setup.py b/sysutils/iocage/files/patch-setup.py
new file mode 100644
index 000000000000..050d3da7ee13
--- /dev/null
+++ b/sysutils/iocage/files/patch-setup.py
@@ -0,0 +1,11 @@
+--- setup.py.orig	2019-09-26 07:23:24 UTC
++++ setup.py
+@@ -58,7 +58,7 @@ setup(
+         'dnspython>=1.15.0',
+         'libzfs'
+     ],
+-    setup_requires=['pytest-runner'],
++#    setup_requires=['pytest-runner'],
+     entry_points={'console_scripts': ['iocage = iocage_lib:cli']},
+     data_files=_data,
+     tests_require=['pytest', 'pytest-cov', 'pytest-pep8']


More information about the dev-commits-ports-main mailing list