regression_tests.R 774 Bytes
Newer Older
1
# Execute Regression test by comparing RD files stored in folders /tests/tmp/ref and /tests/tmp/test
2
Args <- commandArgs(trailingOnly = TRUE)
3
4
5

source("tests/testthat/helper_regression.R")

6
lActions <- list(
7
8
9
10
11
12
13
14
15
16
17
  stable = StoreStableExampleResults,
  dev = StoreDevExampleResults,
  compare = CompareStableDev
)

if(Args %in% names(lActions)) {
  lActions[[Args]]()
} else {
  stop("This script should be run with one argument in the command line:\n",
       "`Rscript tests/regression_tests.R [stable|dev|compare]`.\n",
       "Available arguments are:\n",
18
       "- stable: install stable version from CRAN, run and store examples\n",
19
20
21
       "- dev: install dev version from current directory, run and store examples\n",
       "- compare: stored results of both versions")
}