1 | #!/usr/bin/env bash
|
2 | #
|
3 | # Usage:
|
4 | # devtools/R-test.sh <function name>
|
5 |
|
6 | set -o nounset
|
7 | set -o pipefail
|
8 | set -o errexit
|
9 |
|
10 | source build/dev-shell.sh # R_LIBS_USER
|
11 |
|
12 | show-r() {
|
13 | set -x
|
14 | which R
|
15 | R --version
|
16 | set +x
|
17 | }
|
18 |
|
19 | test-r-packages() {
|
20 | # tidyr and stringr don't print anything
|
21 |
|
22 | Rscript -e 'library(dplyr); library(tidyr); library(stringr); library("RUnit"); print("OK")'
|
23 | }
|
24 |
|
25 | soil-run() {
|
26 | show-r
|
27 | echo
|
28 |
|
29 | test-r-packages
|
30 | echo
|
31 |
|
32 | benchmarks/report.sh report-test
|
33 | echo
|
34 | }
|
35 |
|
36 | "$@"
|