git: 5e99d0b859ff - main - textproc/R-cran-vroom: Fix tests

From: Nuno Teixeira <eduardo_at_FreeBSD.org>
Date: Thu, 29 Jan 2026 19:21:57 UTC
The branch main has been updated by eduardo:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5e99d0b859ff7ee2d7ecd1749114868449244a74

commit 5e99d0b859ff7ee2d7ecd1749114868449244a74
Author:     Nuno Teixeira <eduardo@FreeBSD.org>
AuthorDate: 2026-01-29 19:02:00 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2026-01-29 19:21:31 +0000

    textproc/R-cran-vroom: Fix tests
    
    Tests are supposed to be run with unprivileged user. Running as root, tests fail.
    See also: https://github.com/tidyverse/vroom/issues/611
---
 textproc/R-cran-vroom/Makefile | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/textproc/R-cran-vroom/Makefile b/textproc/R-cran-vroom/Makefile
index 1cf57a32ea11..ceaf0044733b 100644
--- a/textproc/R-cran-vroom/Makefile
+++ b/textproc/R-cran-vroom/Makefile
@@ -37,8 +37,6 @@ USES=		compiler:c++11-lang cran:auto-plist,compiles shebangfix
 
 SHEBANG_FILES=	inst/bench/*.sh
 
-TESTING_UNSAFE=	https://github.com/tidyverse/vroom/issues/611
-
 pre-test:
 
 # Test depends not ported yet
@@ -47,4 +45,13 @@ pre-test:
 		repos = "https://cloud.r-project.org")'
 .endfor
 
+# Tests are supposed to be run with unprivileged user. Running as root, tests fail.
+# See also: https://github.com/tidyverse/vroom/issues/611
+do-test:
+	@${MKDIR} ${WRKDIR}/tmp
+	@${CHMOD} 777 ${WRKDIR}/tmp
+	@cd ${WRKSRC} && \
+		${SETENV} ${TEST_ENV} TMPDIR=${WRKDIR}/tmp _R_CHECK_FORCE_SUGGESTS_=false \
+		su -m nobody -c "${LOCALBASE}/bin/R CMD check --no-manual --no-build-vignettes ."
+
 .include <bsd.port.mk>