Skip to content

Commit da2321b

Browse files
CRAN/TESTS: Skipping some tests when running on Windows 32-bit and not explicitly requesting _R_CHECK_FULL_=true
1 parent ea05500 commit da2321b

14 files changed

+76
-34
lines changed

tests/batchtools_custom.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ stopifnot(inherits(f, "BatchtoolsFuture"))
1919

2020
## Check whether a batchtools_custom future is resolved
2121
## or not will force evaluation
22-
print(resolved(f))
23-
stopifnot(resolved(f))
22+
print(is_resolved <- resolved(f))
23+
stopifnot(is_resolved)
2424

2525
y <- value(f)
2626
print(y)

tests/batchtools_interactive.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ stopifnot(inherits(f, "BatchtoolsFuture"))
1212

1313
## Check whether a batchtools_interactive future is resolved
1414
## or not will force evaluation
15-
print(resolved(f))
16-
stopifnot(resolved(f))
15+
print(is_resolved <- resolved(f))
16+
stopifnot(is_resolved)
1717

1818
y <- value(f)
1919
print(y)

tests/batchtools_local.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ stopifnot(inherits(f, "BatchtoolsFuture"))
1212

1313
## Check whether a batchtools_local future is resolved
1414
## or not will force evaluation
15-
print(resolved(f))
16-
stopifnot(resolved(f))
15+
print(is_resolved <- resolved(f))
16+
stopifnot(is_resolved)
1717

1818
y <- value(f)
1919
print(y)

tests/batchtools_multicore.R

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -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+
122123
message("*** batchtools_multicore() ... DONE")
123124

124125
source("incl/end.R")

tests/demo.R

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
source("incl/start.R")
22

3+
plan(batchtools_local)
4+
5+
## CRAN processing times:
6+
## On Windows 32-bit, don't run these tests via batchtools
7+
if (!fullTest && isWin32) plan(sequential)
8+
39
options(future.demo.mandelbrot.nrow = 2L)
410
options(future.demo.mandelbrot.resolution = 50L)
511
options(future.demo.mandelbrot.delay = FALSE)
@@ -8,7 +14,6 @@ message("*** Demos ...")
814

915
message("*** Mandelbrot demo of the 'future' package ...")
1016

11-
plan(batchtools_local)
1217
demo("mandelbrot", package = "future", ask = FALSE)
1318

1419
message("*** Demos ... DONE")

tests/dotdotdot.R

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
source("incl/start.R")
22
library("listenv")
33

4+
strategies <- c("batchtools_interactive", "batchtools_local")
5+
6+
## CRAN processing times:
7+
## On Windows 32-bit, don't run these tests
8+
if (!fullTest && isWin32) strategies <- character(0L)
9+
10+
411
message("*** Global argument '...' in futures ...")
512

613
sum_fcns <- list()
@@ -34,7 +41,7 @@ sum_fcns$D <- function(x, y) {
3441
}
3542

3643

37-
for (strategy in c("batchtools_interactive", "batchtools_local")) {
44+
for (strategy in strategies) {
3845
plan(strategy, substitute = FALSE)
3946

4047
for (name in names(sum_fcns)) {

tests/future,labels.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ message("*** Futures - labels ...")
44

55
strategies <- c("batchtools_local")
66

7+
## CRAN processing times:
8+
## On Windows 32-bit, don't run these tests
9+
if (!fullTest && isWin32) strategies <- character(0L)
10+
711
for (strategy in strategies) {
812
mprintf("- plan('%s') ...\n", strategy)
913
plan(strategy)

tests/future,lazy.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ message("*** Futures - lazy ...")
44

55
strategies <- c("batchtools_local")
66

7+
## CRAN processing times:
8+
## On Windows 32-bit, don't run these tests
9+
if (!fullTest && isWin32) strategies <- character(0L)
10+
711
for (strategy in strategies) {
812
mprintf("- plan('%s') ...\n", strategy)
913
plan(strategy)

tests/globals,formulas.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ library("stats") ## lm(), poly(), xtabs()
55

66
plan(batchtools_local)
77

8+
## CRAN processing times:
9+
## On Windows 32-bit, don't run these tests on batchtools
10+
if (!fullTest && isWin32) plan(sequential)
11+
812
message("*** Globals - formulas ...")
913

1014
message("*** Globals - lm(<formula>) ...")

tests/globals,manual.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ source("incl/start.R")
22

33
plan(batchtools_local)
44

5+
## CRAN processing times:
6+
## On Windows 32-bit, don't run these tests on batchtools
7+
if (!fullTest && isWin32) plan(sequential)
8+
59
message("*** Globals - manually ...")
610

711
message("*** Globals manually specified as named list ...")

0 commit comments

Comments
 (0)