runtime test for tricky enumerations and support for out of source testing via args option to R

This commit is contained in:
Richard Beare 2015-08-11 09:23:27 +10:00 committed by William S Fulton
commit 1a6d952094
13 changed files with 44 additions and 12 deletions

View file

@ -5,7 +5,7 @@
LANGUAGE = r
SCRIPTSUFFIX = _runme.R
WRAPSUFFIX = .R
RUNR = R CMD BATCH --no-save --no-restore
RUNR = R CMD BATCH --no-save --no-restore '--args $(SCRIPTDIR)'
srcdir = @srcdir@
top_srcdir = @top_srcdir@
@ -44,6 +44,7 @@ include $(srcdir)/../common.mk
+$(swig_and_compile_multi_cpp)
$(run_multitestcase)
# Runs the testcase.
#
# Run the runme if it exists. If not just load the R wrapper to

View file

@ -1,4 +1,6 @@
source("unittest.R")
clargs <- commandArgs(trailing=TRUE)
source(file.path(clargs[1], "unittest.R"))
dyn.load(paste("arrays_dimensionless", .Platform$dynlib.ext, sep=""))
source("arrays_dimensionless.R")
cacheMetaData(1)

View file

@ -1,4 +1,6 @@
source("unittest.R")
clargs <- commandArgs(trailing=TRUE)
source(file.path(clargs[1], "unittest.R"))
dyn.load(paste("funcptr", .Platform$dynlib.ext, sep=""))
source("funcptr.R")
cacheMetaData(1)

View file

@ -1,4 +1,6 @@
source("unittest.R")
clargs <- commandArgs(trailing=TRUE)
source(file.path(clargs[1], "unittest.R"))
dyn.load(paste("ignore_parameter", .Platform$dynlib.ext, sep=""))
source("ignore_parameter.R")
cacheMetaData(1)

View file

@ -1,4 +1,6 @@
source("unittest.R")
clargs <- commandArgs(trailing=TRUE)
source(file.path(clargs[1], "unittest.R"))
dyn.load(paste("integers", .Platform$dynlib.ext, sep=""))
source("integers.R")
cacheMetaData(1)

View file

@ -1,4 +1,6 @@
source("unittest.R")
clargs <- commandArgs(trailing=TRUE)
source(file.path(clargs[1], "unittest.R"))
dyn.load(paste("overload_method", .Platform$dynlib.ext, sep=""))
source("overload_method.R")
cacheMetaData(1)

View file

@ -0,0 +1,11 @@
clargs <- commandArgs(trailing=TRUE)
source(file.path(clargs[1], "unittest.R"))
dyn.load(paste("preproc_constants", .Platform$dynlib.ext, sep=""))
source("preproc_constants.R")
cacheMetaData(1)
v <- enumToInteger('kValue', '_MyEnum')
print(v)
unittest(v,4)
q(save="no")

View file

@ -1,4 +1,6 @@
source("unittest.R")
clargs <- commandArgs(trailing=TRUE)
source(file.path(clargs[1], "unittest.R"))
dyn.load(paste("r_copy_struct", .Platform$dynlib.ext, sep=""))
source("r_copy_struct.R")
cacheMetaData(1)

View file

@ -1,4 +1,6 @@
source("unittest.R")
clargs <- commandArgs(trailing=TRUE)
source(file.path(clargs[1], "unittest.R"))
dyn.load(paste("r_legacy", .Platform$dynlib.ext, sep=""))
source("r_legacy.R")
cacheMetaData(1)

View file

@ -1,4 +1,6 @@
source("unittest.R")
clargs <- commandArgs(trailing=TRUE)
source(file.path(clargs[1], "unittest.R"))
dyn.load(paste("r_sexp", .Platform$dynlib.ext, sep=""))
source("r_sexp.R")
cacheMetaData(1)

View file

@ -1,4 +1,6 @@
source("unittest.R")
clargs <- commandArgs(trailing=TRUE)
source(file.path(clargs[1], "unittest.R"))
dyn.load(paste("rename_simple", .Platform$dynlib.ext, sep=""))
source("rename_simple.R")
cacheMetaData(1)

View file

@ -1,4 +1,5 @@
source("unittest.R")
clargs <- commandArgs(trailing=TRUE)
source(file.path(clargs[1], "unittest.R"))
dyn.load(paste("simple_array", .Platform$dynlib.ext, sep=""))
source("simple_array.R")
cacheMetaData(1)

View file

@ -1,4 +1,5 @@
source("unittest.R")
clargs <- commandArgs(trailing=TRUE)
source(file.path(clargs[1], "unittest.R"))
dyn.load(paste("unions", .Platform$dynlib.ext, sep=""))
source("unions.R")
cacheMetaData(1)