Skip to content
Snippets Groups Projects
Commit 3ce3c3ac authored by Florian Angerer's avatar Florian Angerer
Browse files

Read global mx args for package testing from file 'test.mx.args'.

parent 3d1fdcc8
No related branches found
No related tags found
No related merge requests found
......@@ -164,6 +164,19 @@ choice.depends <- function(pkg, choice=c("direct","suggests")) {
unname(all.deps)
}
# provides JVM args when running the tests
fastr.test.jvm.args <- function() {
mx.args.file <- "com.oracle.truffle.r.test.packages/test.mx.args"
tryCatch({
if (file.exists(mx.args.file)) {
opts <- paste0('"', paste0("--Ja @", readLines(mx.args.file), collapse=" "), '"')
log.message(paste0("MX_R_GLOBAL_ARGS=", opts), level=1)
return (opts)
}
})
return ("'--Ja @-DR:+IgnoreGraphicsCalls'")
}
# returns a vector of package names that are the direct dependents of pkg
direct.depends <- function(pkg) {
choice.depends(pkg, "direct")
......@@ -837,7 +850,12 @@ system.test <- function(pkgname) {
# we want to stop tests that hang, but some packages have many tests
# each of which spawns a sub-process (over which we have no control)
# so we time out the entire set after 20 minutes.
rc <- system2(rscript, args, env=c("FASTR_PROCESS_TIMEOUT=20", paste0("R_LIBS_USER=",shQuote(lib.install)),"R_LIBS="))
env <- c("FASTR_PROCESS_TIMEOUT=20",
paste0("R_LIBS_USER=", shQuote(lib.install)),
"R_LIBS=",
paste0("MX_R_GLOBAL_ARGS=", fastr.test.jvm.args())
)
rc <- system2(rscript, args, env=env)
rc
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment