Skip to content

Commit 856492d

Browse files
committed
restore tests based on RCPP environment variable
1 parent c81beae commit 856492d

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
^src/tbb/build/lib_.*$
44
^inst/lib$
55
^.travis.yml
6+
^tests
67

78

DESCRIPTION

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ Description: High level functions for doing parallel programming with Rcpp.
99
For example, the parallelFor function can be used to convert the work of
1010
a standard serial "for" loop into a parallel one and the parallelReduce
1111
function can be used for accumulating aggregate or other values.
12-
Suggests: Rcpp, testthat
1312
SystemRequirements: GNU make
1413
License: GPL-2
1514
Collate:

tests/testthat.R

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
require(methods)
22
require(RcppParallel)
33
require(testthat)
4-
require(Rcpp)
4+
5+
RCPP <- Sys.getenv( "RCPP" )
6+
if( RCPP == "Rcpp" ){
7+
message( "testing against Rcpp" )
8+
require(Rcpp)
9+
} else if( RCPP == "Rcpp11" ){
10+
message( "testing against Rcpp11" )
11+
require(attributes)
12+
} else {
13+
stop( "Rcpp implementation not setup, please set the $RCPP environment variable" )
14+
}
515

616
test_dir("testthat")
717

0 commit comments

Comments
 (0)