From 1699daa2c8616400e00f2d78f1ffe79c8b31dcbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Cs=C3=A1rdi?= Date: Sun, 17 Mar 2024 09:38:30 +0100 Subject: [PATCH] Work around failing tests on R 3.6.x Windows --- tests/testthat/test-install-cran.R | 6 +++++- tests/testthat/test-install-svn.R | 1 + tests/testthat/test-script.R | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/testthat/test-install-cran.R b/tests/testthat/test-install-cran.R index 7282fa1f..4ba5ce01 100644 --- a/tests/testthat/test-install-cran.R +++ b/tests/testthat/test-install-cran.R @@ -13,7 +13,11 @@ test_that("", { on.exit(unlink(lib, recursive = TRUE), add = TRUE) dir.create(lib) - install_cran("pkgconfig", lib = lib, repos = repos, force = TRUE, quiet = TRUE) + # we'll get warnings when CRAN moves binary packages to the + # cran-archive server. + suppressWarnings( + install_cran("pkgconfig", lib = lib, repos = repos, force = TRUE, quiet = TRUE) + ) expect_silent(packageDescription("pkgconfig", lib.loc = lib)) }) diff --git a/tests/testthat/test-install-svn.R b/tests/testthat/test-install-svn.R index fa7a3c77..e41475b6 100644 --- a/tests/testthat/test-install-svn.R +++ b/tests/testthat/test-install-svn.R @@ -25,6 +25,7 @@ test_that("install_svn subdir", { test_that("remote_download.svn_remote error", { skip_on_cran() + if (Sys.which("svn") == "") skip("Subversion not installed") x <- list(url = "http://foo.bar.com") diff --git a/tests/testthat/test-script.R b/tests/testthat/test-script.R index 16180061..9479b352 100644 --- a/tests/testthat/test-script.R +++ b/tests/testthat/test-script.R @@ -54,7 +54,7 @@ test_that("install-github.R script does not load any package", { }, args = list(script = script, lib = lib), cmdargs = c("--vanilla", "--slave", "--no-save", "--no-restore"), - timeout = 20 + timeout = 60 ) expect_equal(pkgs[[1]], pkgs[[2]])