aboutsummaryrefslogtreecommitdiff
path: root/tests/testthat/setup_script.R
diff options
context:
space:
mode:
Diffstat (limited to 'tests/testthat/setup_script.R')
-rw-r--r--tests/testthat/setup_script.R7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/testthat/setup_script.R b/tests/testthat/setup_script.R
index b2147fbe..111daa30 100644
--- a/tests/testthat/setup_script.R
+++ b/tests/testthat/setup_script.R
@@ -4,7 +4,12 @@ require(testthat)
# Per default (on my box where I set NOT_CRAN in .Rprofile) use all cores minus one
# Otherwise (CRAN check systems) use the allowed maximum of two cores
if (identical(Sys.getenv("NOT_CRAN"), "true")) {
- n_cores <- parallel::detectCores() - 1
+ # We cannot use all course if on the Agroscope cluster, if not we use all but one
+ if (grepl("agsad.admin.ch", Sys.getenv("http_proxy"))) {
+ n_cores = 16
+ } else {
+ n_cores <- parallel::detectCores() - 1
+ }
} else {
n_cores <- 2
}

Contact - Imprint