@@ -7,6 +7,10 @@ for (cores in 1:min(2L, availableCores("multicore"))) {
77 # # FIXME:
88 if (! fullTest && cores > 1 ) next
99
10+ # # CRAN processing times:
11+ # # On Windows 32-bit, don't run these tests
12+ if (! fullTest && isWin32 ) next
13+
1014 mprintf(" Testing with %d cores ...\n " , cores )
1115 options(mc.cores = cores - 1L )
1216
@@ -15,10 +19,6 @@ for (cores in 1:min(2L, availableCores("multicore"))) {
1519 }
1620
1721 for (globals in c(FALSE , TRUE )) {
18- # # SPEEDUP: Skip part of the tests on Windows to decrease
19- # # the overall testing time on CRAN. /HB 2018-07-18
20- if (! supportsMulticore() && ! globals ) next
21-
2222 mprintf(" *** batchtools_multicore(..., globals = %s) without globals\n " ,
2323 globals )
2424
@@ -35,8 +35,6 @@ for (cores in 1:min(2L, availableCores("multicore"))) {
3535 print(y )
3636 stopifnot(y == 42L )
3737
38- if (! supportsMulticore()) next
39-
4038 mprintf(" *** batchtools_multicore(..., globals = %s) with globals\n " ,
4139 globals )
4240 # # A global variable
@@ -79,26 +77,6 @@ for (cores in 1:min(2L, availableCores("multicore"))) {
7977 }
8078 } # for (globals ...)
8179
82-
83- mprintf(" *** batchtools_multicore() and errors\n " , globals )
84- f <- batchtools_multicore({
85- stop(" Whoops!" )
86- 1
87- })
88- v <- value(f , signal = FALSE )
89- print(v )
90- stopifnot(inherits(v , " simpleError" ))
91-
92- res <- try(value(f ), silent = TRUE )
93- print(res )
94- stopifnot(inherits(res , " try-error" ))
95-
96- # # Error is repeated
97- res <- try(value(f ), silent = TRUE )
98- print(res )
99- stopifnot(inherits(res , " try-error" ))
100-
101-
10280 if (cores > 1 ) {
10381 message(" *** batchtools_multicore(..., workers = 1L) ..." )
10482
@@ -119,6 +97,29 @@ for (cores in 1:min(2L, availableCores("multicore"))) {
11997 mprintf(" Testing with %d cores ... DONE\n " , cores )
12098} # # for (cores ...)
12199
100+
101+ # # CRAN processing times:
102+ # # On Windows 32-bit, don't run these tests
103+ if (fullTest || ! isWin32 ) {
104+ mprintf(" *** batchtools_multicore() and errors\n " , globals )
105+ f <- batchtools_multicore({
106+ stop(" Whoops!" )
107+ 1
108+ })
109+ v <- value(f , signal = FALSE )
110+ print(v )
111+ stopifnot(inherits(v , " simpleError" ))
112+
113+ res <- try(value(f ), silent = TRUE )
114+ print(res )
115+ stopifnot(inherits(res , " try-error" ))
116+
117+ # # Error is repeated
118+ res <- try(value(f ), silent = TRUE )
119+ print(res )
120+ stopifnot(inherits(res , " try-error" ))
121+ }
122+
122123message(" *** batchtools_multicore() ... DONE" )
123124
124125source(" incl/end.R" )
0 commit comments