aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateusz Piotrowski <0mp@FreeBSD.org>2021-07-06 14:42:12 +0000
committerMateusz Piotrowski <0mp@FreeBSD.org>2021-07-06 14:44:12 +0000
commit791385bcd583d27c22b3f95e716b4d36a7565b34 (patch)
tree86c6181d6f2a3a519cdc326a2a2e21e5d7b0d486
parent182a2f3e80236d80983b29bcc3c49c90348b4333 (diff)
downloadports-791385bcd583d27c22b3f95e716b4d36a7565b34.tar.gz
ports-791385bcd583d27c22b3f95e716b4d36a7565b34.zip
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.
-rw-r--r--sysutils/fusefs-unreliablefs/Makefile16
1 files 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>