Skip to content

Commit ea05500

Browse files
TESTS: Skip more tests unless _R_CHECK_FULL_=true
1 parent ae35a0e commit ea05500

File tree

3 files changed

+21
-13
lines changed

3 files changed

+21
-13
lines changed

appveyor.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#----------------------------------------------------------------
66
environment:
77
_R_CHECK_FORCE_SUGGESTS_: false
8+
_R_CHECK_FULL_: true
89

910
matrix:
1011
- R_VERSION: devel

tests/batchtools_multicore.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ for (cores in 1:min(2L, availableCores("multicore"))) {
3434
y <- value(f)
3535
print(y)
3636
stopifnot(y == 42L)
37+
38+
if (!supportsMulticore()) next
3739

3840
mprintf("*** batchtools_multicore(..., globals = %s) with globals\n",
3941
globals)

tests/zzz,future_lapply.R

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,7 @@ library("listenv")
33

44
if (requireNamespace("future.apply", quietly = TRUE)) {
55
future_lapply <- future.apply::future_lapply
6-
7-
cf <- batchtools::makeClusterFunctionsInteractive(external = TRUE)
8-
batchtools_custom_local <- function(expr, substitute = TRUE,
9-
cluster.functions = cf, ...) {
10-
if (substitute) expr <- substitute(expr)
11-
batchtools_custom(expr, substitute = FALSE, ...,
12-
cluster.functions = cluster.functions)
13-
}
14-
class(batchtools_custom_local) <- c("batchtools_custom_local",
15-
class(batchtools_custom))
16-
6+
177
message("All HPC strategies:")
188
strategies <- c("batchtools_lsf", "batchtools_openlava", "batchtools_sge",
199
"batchtools_slurm", "batchtools_torque")
@@ -22,10 +12,25 @@ if (requireNamespace("future.apply", quietly = TRUE)) {
2212
message("Supported HPC strategies:")
2313
strategies <- strategies[sapply(strategies, FUN = test_strategy)]
2414
mprint(strategies)
15+
16+
strategies <- c("batchtools_local", strategies)
17+
18+
if (fullTest) {
19+
strategies <- c("batchtools_interactive", strategies)
20+
21+
cf <- batchtools::makeClusterFunctionsInteractive(external = TRUE)
22+
batchtools_custom_local <- function(expr, substitute = TRUE,
23+
cluster.functions = cf, ...) {
24+
if (substitute) expr <- substitute(expr)
25+
batchtools_custom(expr, substitute = FALSE, ...,
26+
cluster.functions = cluster.functions)
27+
}
28+
class(batchtools_custom_local) <- c("batchtools_custom_local",
29+
class(batchtools_custom))
30+
strategies <- c("batchtools_custom_local", strategies)
31+
}
2532

2633
message("Strategies to test with:")
27-
strategies <- c("batchtools_interactive", "batchtools_local",
28-
"batchtools_custom_local", strategies)
2934
mprint(strategies)
3035

3136

0 commit comments

Comments
 (0)