File tree Expand file tree Collapse file tree 2 files changed +40
-1
lines changed
Expand file tree Collapse file tree 2 files changed +40
-1
lines changed Original file line number Diff line number Diff line change 11Package: future.batchtools
2- Version: 0.12.2-9935
2+ Version: 0.12.2-9936
33Depends:
44 R (>= 3.2.0),
55 parallelly,
Original file line number Diff line number Diff line change 1+ # ' @tags skip_on_cran
2+ # ' @tags batchtools_bash
3+
4+ library(future )
5+ library(listenv )
6+
7+ message(" *** batchtools_bash() ..." )
8+
9+ bin <- Sys.which(" bash" )
10+ if (utils :: file_test(" -f" , bin )) {
11+ plan(future.batchtools :: batchtools_bash )
12+ print(plan())
13+
14+ message(" *** Launch future" )
15+
16+ f <- future({
17+ 42L
18+ })
19+ stopifnot(inherits(f , " BatchtoolsFuture" ))
20+
21+ y <- value(f )
22+ print(y )
23+ stopifnot(y == 42L )
24+
25+
26+ message(" *** Launch future with run-time error" )
27+ f <- future({
28+ stop(" Whoops!" )
29+ 1
30+ })
31+ v <- value(f , signal = FALSE )
32+ print(v )
33+ stopifnot(inherits(v , " error" ))
34+ } else {
35+ message(" Skipping: 'bash' is not available" )
36+ }
37+
38+ message(" *** batchtools_bash() ... DONE" )
39+
You can’t perform that action at this time.
0 commit comments