Date: Tue, 6 Jul 2021 14:44:21 GMT From: Mateusz Piotrowski <0mp@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 791385bcd583 - main - sysutils/fusefs-unreliablefs: Improve do-test Message-ID: <202107061444.166EiLEI090197@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by 0mp: URL: https://cgit.FreeBSD.org/ports/commit/?id=791385bcd583d27c22b3f95e716b4d36a7565b34 commit 791385bcd583d27c22b3f95e716b4d36a7565b34 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2021-07-06 14:42:12 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2021-07-06 14:44:12 +0000 sysutils/fusefs-unreliablefs: Improve do-test - Remove an unnecessary testing argument from USES=cmake - Add some additional checks to make sure that FUSE is available. - Simplify providing the build directory to the test suite. --- sysutils/fusefs-unreliablefs/Makefile | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/sysutils/fusefs-unreliablefs/Makefile b/sysutils/fusefs-unreliablefs/Makefile index f0a8e9bd818f..9af80752c8c3 100644 --- a/sysutils/fusefs-unreliablefs/Makefile +++ b/sysutils/fusefs-unreliablefs/Makefile @@ -17,7 +17,7 @@ BROKEN_FreeBSD_11= error: use of undeclared identifier 'EINTEGRITY' TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>=0:devel/py-pytest@${PY_FLAVOR} \ fio:benchmarks/fio -USES= cmake:testing fuse pkgconfig python:env +USES= cmake fuse pkgconfig python:env USE_CSTD= c11 USE_GITHUB= yes GH_ACCOUNT= ligurio @@ -40,11 +40,19 @@ do-install: ${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.conf.5 ${STAGEDIR}${PREFIX}/share/man/man5 do-test: +# fusefs(5) must be loaded. + if ! kldload -n fusefs; then \ + ${ECHO_MSG} "Cannot load the fusefs kernel module"; \ + ${FALSE}; \ + fi +# /dev/fuse must be writtable and readable to the user running the tests. + if [ ! -r /dev/fuse ] || [ ! -w /dev/fuse ]; then \ + ${ECHO_MSG} "Current user does cannot access /dev/fuse"; \ + ${FALSE}; \ + fi # The test suite assumes that the binaries are available in the ${WRKSRC}/build # directory, which is not the case here. - ${MKDIR} ${WRKSRC}/build/tests - ${RLN} ${INSTALL_WRKSRC}/${PORTNAME} ${WRKSRC}/build/ - ${RLN} ${INSTALL_WRKSRC}/tests/fsx ${WRKSRC}/build/tests + ${LN} -Fs ${INSTALL_WRKSRC} ${WRKSRC}/build cd ${WRKSRC} && ${SETENV} ${TEST_ENV} pytest --verbose -rxXs tests/ .include <bsd.port.mk>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202107061444.166EiLEI090197>