R version 4.6.0 RC (2026-04-22 r89945 ucrt) -- "Because it was There" Copyright (C) 2026 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > #! /usr/bin/env Rscript > ## This runs testme test script inst/testme/test-batchtools_custom.R > ## Don't edit - it was autogenerated by inst/testme/deploy.R > future.batchtools:::testme("batchtools_custom") Test 'batchtools_custom' ... chr "none" > library(future) > library(batchtools) > library(listenv) > message("*** batchtools_custom() ...") *** batchtools_custom() ... > message("*** batchtools_custom() w/ 'conf.file' on R_BATCHTOOLS_SEARCH_PATH") *** batchtools_custom() w/ 'conf.file' on R_BATCHTOOLS_SEARCH_PATH > plan(future.batchtools::batchtools_custom) > f <- future({ + 42 + }) > print(f) BatchtoolsCustomFuture: Label: Expression: { 42L } Globals: Packages: L'Ecuyer-CMRG RNG seed: (seed = FALSE) Capture standard output: TRUE Capture condition classes: 'condition' (excluding '') Immediate condition classes: 'immediateCondition' Lazy evaluation: FALSE Local evaluation: TRUE Early signaling: FALSE Actions: [n=1] 'run' State: 'submitted' ("Future has been submitted, but it is not known if it has been started") Resolved: TRUE Unique identifier: 82764f815a2bb22c8a29e133e9c70888-1 Owner process: 82764f815a2bb22c8a29e133e9c70888 Class: 'BatchtoolsCustomFuture', 'BatchtoolsFuture', 'Future' Value: Conditions captured: batchtools configuration file: batchtools cluster functions: 'Interactive' batchtools cluster functions template: batchtools status: 'defined', 'finished', 'started', 'submitted' Output captured by batchtools: [output] ### [bt]: This is batchtools v0.9.18 [output] ### [bt]: Starting calculation of 1 jobs [output] ### [bt]: Setting working directory to 'D:/RCompile/CRANincoming/R-devel/future.batchtools.Rcheck/tests' [output] Loading required package: methods [output] ### [bt]: Memory measurement disabled [output] ### [bt]: Starting job [batchtools job.id=1] [output] ### [bt]: Setting seed to 24639 ... [output] [output] ### [bt]: Job terminated successfully [batchtools job.id=1] [output] ### [bt]: Calculation finished! batchtools Registry: File dir exists: TRUE Work dir exists: TRUE Job Registry Backend : Interactive File dir : D:/temp/2026_04_25_00_50_17_18966/RtmpYnpykl/.future/20260425_005126-Ynpykl/batchtools_690820547 Work dir : D:/RCompile/CRANincoming/R-devel/future.batchtools.Rcheck/tests Jobs : 1 Seed : 24638 Writeable: TRUE > stopifnot(inherits(f, "BatchtoolsFuture")) > v <- value(f) > print(v) [1] 42 > stopifnot(v == 42) > message("*** batchtools_custom() w/ 'cluster.functions' without globals") *** batchtools_custom() w/ 'cluster.functions' without globals > cf <- makeClusterFunctionsInteractive(external = TRUE) > str(cf) List of 11 $ name : chr "Interactive" $ submitJob :function (reg, jc) $ killJob : NULL $ listJobsQueued : NULL $ listJobsRunning : NULL $ array.var : chr NA $ store.job.collection: logi TRUE $ store.job.files : logi FALSE $ scheduler.latency : num 0 $ fs.latency : num 0 $ hooks : list() - attr(*, "class")= chr "ClusterFunctions" > plan(future.batchtools::batchtools_custom, cluster.functions = cf) Warning in tweak.future(base::quote(function (...) : Detected 1 unknown future arguments: 'cluster.functions' > f <- future({ + 42 + }) > stopifnot(inherits(f, "BatchtoolsFuture")) > print(is_resolved <- resolved(f)) [1] TRUE > stopifnot(is_resolved) > y <- value(f) > print(y) [1] 42 > stopifnot(y == 42) > message("*** batchtools_custom() w/ 'cluster.functions' with globals") *** batchtools_custom() w/ 'cluster.functions' with globals > a <- 0 > f <- future({ + b <- 3 + c <- 2 + a * b * c + }) > print(f) BatchtoolsCustomFuture: Label: Expression: { b <- 3 c <- 2 a * b * c } Globals: 1 objects totaling 346 bytes (numeric 'a' of 39 bytes) Packages: L'Ecuyer-CMRG RNG seed: (seed = FALSE) Capture standard output: TRUE Capture condition classes: 'condition' (excluding '') Immediate condition classes: 'immediateCondition' Lazy evaluation: FALSE Local evaluation: TRUE Early signaling: FALSE Actions: [n=1] 'run' State: 'submitted' ("Future has been submitted, but it is not known if it has been started") Resolved: TRUE Unique identifier: 82764f815a2bb22c8a29e133e9c70888-3 Owner process: 82764f815a2bb22c8a29e133e9c70888 Class: 'BatchtoolsCustomFuture', 'BatchtoolsFuture', 'Future' Value: Conditions captured: batchtools configuration file: batchtools cluster functions: 'Interactive' batchtools cluster functions template: batchtools status: 'defined', 'finished', 'started', 'submitted' Output captured by batchtools: [output] ### [bt]: This is batchtools v0.9.18 [output] ### [bt]: Starting calculation of 1 jobs [output] ### [bt]: Setting working directory to 'D:/RCompile/CRANincoming/R-devel/future.batchtools.Rcheck/tests' [output] Loading required package: methods [output] ### [bt]: Memory measurement disabled [output] ### [bt]: Starting job [batchtools job.id=1] [output] ### [bt]: Setting seed to 27126 ... [output] [output] ### [bt]: Job terminated successfully [batchtools job.id=1] [output] ### [bt]: Calculation finished! batchtools Registry: File dir exists: TRUE Work dir exists: TRUE Job Registry Backend : Interactive File dir : D:/temp/2026_04_25_00_50_17_18966/RtmpYnpykl/.future/20260425_005126-Ynpykl/batchtools_826375698 Work dir : D:/RCompile/CRANincoming/R-devel/future.batchtools.Rcheck/tests Jobs : 1 Seed : 27125 Writeable: TRUE > a <- 7 > v <- value(f) > print(v) [1] 0 > stopifnot(v == 0) > message("*** batchtools_custom() w/ 'cluster.functions' with globals (tricky)") *** batchtools_custom() w/ 'cluster.functions' with globals (tricky) > x <- listenv() > for (ii in 1:2) { + x[[ii]] <- future({ + ii + }, globals = TRUE) + } > v <- unlist(value(x)) > stopifnot(all(v == 1:2)) > message("*** batchtools_custom() w/ 'cluster.functions' and errors") *** batchtools_custom() w/ 'cluster.functions' and errors > f <- future({ + stop("Whoops!") + 1 + }) > v <- value(f, signal = FALSE) Warning in delete.BatchtoolsFuture(future) : Will not remove batchtools registry, because the status of the batchtools was 'error', 'defined', 'finished', 'started', 'submitted' and future backend argument 'delete' is 'on-success': 'D:/temp/2026_04_25_00_50_17_18966/RtmpYnpykl/.future/20260425_005126-Ynpykl/batchtools_1874813182' > print(v) > stopifnot(inherits(v, "error")) > res <- try({ + v <- value(f) + }, silent = TRUE) > print(res) [1] "Error in eval(quote({ : Whoops!\n" attr(,"class") [1] "try-error" attr(,"condition") > stopifnot(inherits(res, "try-error")) > res <- try(value(f), silent = TRUE) > print(res) [1] "Error in eval(quote({ : Whoops!\n" attr(,"class") [1] "try-error" attr(,"condition") > stopifnot(inherits(res, "try-error")) > message("*** batchtools_custom() ... DONE") *** batchtools_custom() ... DONE Failed to undo environment variables: - Expected environment variables: [n=220] '!ExitCode', 'ALLUSERSPROFILE', 'APPDATA', ..., 'tempdirname' - Environment variables still there: [n=0] - Environment variables missing: [n=1] 'MAKEFLAGS' Differences environment variable by environment variable: Skipping, because path appears not to be an 'R CMD check' folder: 'D:/temp/2026_04_25_00_50_17_18966' Test time: user.self=0.9s, sys.self=0.1s, elapsed=6s, user.child=NAs, sys.child=NAs Test 'tempdirname' ... success > > proc.time() user system elapsed 1.46 0.32 6.65 Warning message: In delete.BatchtoolsFuture(f, onRunning = "skip", onMissing = "ignore", : Will not remove batchtools registry, because the status of the batchtools was 'error', 'defined', 'finished', 'started', 'submitted' and future backend argument 'delete' is 'on-success': 'D:/temp/2026_04_25_00_50_17_18966/RtmpYnpykl/.future/20260425_005126-Ynpykl/batchtools_1874813182'