Date: Fri, 30 Jan 2026 15:48:53 +0000 From: Nuno Teixeira <eduardo@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: d9d38da8f31e - main - textproc/R-cran-vroom: Really fix tests Message-ID: <697cd2e5.38325.4093e744@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by eduardo: URL: https://cgit.FreeBSD.org/ports/commit/?id=d9d38da8f31e83c3ae33955198a7f84962ceaf97 commit d9d38da8f31e83c3ae33955198a7f84962ceaf97 Author: Nuno Teixeira <eduardo@FreeBSD.org> AuthorDate: 2026-01-30 15:30:55 +0000 Commit: Nuno Teixeira <eduardo@FreeBSD.org> CommitDate: 2026-01-30 15:48:40 +0000 textproc/R-cran-vroom: Really fix tests Apply upstream patch that solves tests failure using other logic instead of port workaround. --- textproc/R-cran-vroom/Makefile | 9 -------- textproc/R-cran-vroom/files/patch-fix-tests | 35 +++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 9 deletions(-) diff --git a/textproc/R-cran-vroom/Makefile b/textproc/R-cran-vroom/Makefile index ceaf0044733b..3f232bdca4ef 100644 --- a/textproc/R-cran-vroom/Makefile +++ b/textproc/R-cran-vroom/Makefile @@ -45,13 +45,4 @@ 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> diff --git a/textproc/R-cran-vroom/files/patch-fix-tests b/textproc/R-cran-vroom/files/patch-fix-tests new file mode 100644 index 000000000000..7724f2f7952b --- /dev/null +++ b/textproc/R-cran-vroom/files/patch-fix-tests @@ -0,0 +1,35 @@ +From cd07f44dc51ddcb0795ccda84c814c8af75668df Mon Sep 17 00:00:00 2001 +From: Jenny Bryan <jenny.f.bryan@gmail.com> +Date: Thu, 29 Jan 2026 15:10:37 -0800 +Subject: [PATCH] Improve this test + +Closes #611 +--- + tests/testthat/test-connection.R | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +diff --git tests/testthat/test-connection.R tests/testthat/test-connection.R +index 22b23b37..86aecc4e 100644 +--- tests/testthat/test-connection.R ++++ tests/testthat/test-connection.R +@@ -116,12 +116,16 @@ test_that("vroom_fwf() doesn't leak a connection when opening fails (permission + Sys.chmod(tfile, mode = "000") # Remove all permissions + connections_before <- showConnections(all = TRUE) + +- # Not using snapshots, because not our error or warning +- expect_error( +- expect_warning( ++ # It is conceivable that this vroom_fwf() will succeed if, for example, tests ++ # are being run by root? ++ # See https://github.com/tidyverse/vroom/issues/611 ++ # Therefore, we don't state a hard expectation around error or warning. ++ # We just care that connections don't leak. ++ try( ++ suppressWarnings( + vroom_fwf(file(tfile), fwf_widths(c(6, 6, 6)), show_col_types = FALSE) + ), +- "cannot open" ++ silent = TRUE + ) + + connections_after <- showConnections(all = TRUE)home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?697cd2e5.38325.4093e744>
