OILS / devtools / R-test.sh View on Github | oilshell.org

36 lines, 21 significant
1#!/usr/bin/env bash
2#
3# Usage:
4# devtools/R-test.sh <function name>
5
6set -o nounset
7set -o pipefail
8set -o errexit
9
10source build/dev-shell.sh # R_LIBS_USER
11
12show-r() {
13 set -x
14 which R
15 R --version
16 set +x
17}
18
19test-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
25soil-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"$@"