Skip to content

Commit 91fa770

Browse files
committed
clear R_TESTS when building the test package
R CMD check sets R_TESTS=startup.Rs when running tests, which breaks R sub-processes run with a different working directory. the Rscript invocations in the test package's Makevars failed at startup because of this, expanding CxxFlags() and RcppParallelLibs() to nothing, so compilation failed with tbb/scalable_allocator.h not found.
1 parent aa84a57 commit 91fa770

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

tests/scalable-allocator.R

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,11 @@ libDir <- file.path(tempdir(), "library")
8989
dir.create(libDir, recursive = TRUE, showWarnings = FALSE)
9090
Sys.setenv(R_LIBS = paste(.libPaths(), collapse = .Platform$path.sep))
9191

92+
# R CMD check sets R_TESTS=startup.Rs, which breaks R sub-processes run
93+
# with a different working directory -- like the Rscript invocations in
94+
# the test package's Makevars (see also tests/doRUnit.R)
95+
Sys.setenv(R_TESTS = "")
96+
9297
rExe <- file.path(R.home("bin"), if (.Platform$OS.type == "windows") "R.exe" else "R")
9398
args <- c("CMD", "INSTALL", "--no-multiarch", paste0("--library=", shQuote(libDir)), shQuote(pkgRoot))
9499

0 commit comments

Comments
 (0)