Running ‘testthat.R’ [1m/90m]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(heemod)
  > 
  > ## the Sys.setenv fixes a problem running tests
  > ##   with parallel processing; related to
  > ##   https://github.com/hadley/testthat/issues/86 and
  > ##   https://github.com/hadley/testthat/issues/144
  > 
  > Sys.setenv("R_TESTS" = "")
  > 
  > test_check("heemod")
  ── 1. Error: Same results using 1 core or 2. (@test_parallel.R#12)  ────────────
  cannot open the connection
  1: run_model_tabular(location = system.file("tabular/thr", package = "heemod"), reference = "REFERENCE_2core.csv", 
         save = FALSE, overwrite = FALSE, run_psa = FALSE) at testthat/test_parallel.R:12
  2: eval_models_from_tabular(inputs, run_dsa = run_dsa, run_psa = run_psa, run_demo = run_demo)
  3: use_cluster(inputs$model_options$num_cores)
  4: parallel::makeCluster(num_cores, type = cluster_type)
  5: makeForkCluster(nnodes = spec, ...)
  6: newForkNode(..., rank = i)
  7: slaveLoop(makeSOCKmaster(master, port, timeout))
  8: tryCatch({
         msg <- recvData(master)
         if (msg$type == "DONE") {
             closeNode(master)
             break
         }
         else if (msg$type == "EXEC") {
             success <- TRUE
             handler <- function(e) {
                 success <<- FALSE
                 structure(conditionMessage(e), class = c("snow-try-error", "try-error"))
             }
             t1 <- proc.time()
             value <- tryCatch(do.call(msg$data$fun, msg$data$args, quote = TRUE), error = handler)
             t2 <- proc.time()
             value <- list(type = "VALUE", value = value, success = success, time = t2 - 
                 t1, tag = msg$data$tag)
             msg <- NULL
             sendData(master, value)
             value <- NULL
         }
     }, interrupt = function(e) NULL)
  9: tryCatchList(expr, classes, parentenv, handlers)
  10: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  11: doTryCatch(return(expr), name, parentenv, handler)
  12: recvData(master)
  13: makeSOCKmaster(master, port, timeout)
  14: socketConnection(master, port = port, blocking = TRUE, open = "a+b", timeout = timeout)
  
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 164 SKIPPED: 0 FAILED: 0
  Execution halted
  
   *** caught segfault ***
  address (nil), cause 'memory not mapped'
  An irrecoverable exception occurred. R is aborting now ...