[ARVADOS] updated: 1.1.2-260-gabdc3d8

Git user git at public.curoverse.com
Fri Feb 2 23:13:14 EST 2018


Summary of changes:
 build/run-tests.sh                             | 34 +++++++++++++++++++++++++-
 sdk/R/run_test.R                               |  7 ++++++
 tools/arvbox/lib/arvbox/docker/Dockerfile.base |  2 +-
 3 files changed, 41 insertions(+), 2 deletions(-)
 create mode 100644 sdk/R/run_test.R

       via  abdc3d88ac10b8f3b634b4f1edd46e3597d54ee2 (commit)
      from  8ca0b1449607ded51e908481cc4660c20f43a777 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit abdc3d88ac10b8f3b634b4f1edd46e3597d54ee2
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date:   Fri Feb 2 23:11:46 2018 -0500

    11876: Add sdk/R to run-tests.sh
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>

diff --git a/build/run-tests.sh b/build/run-tests.sh
index a02f732..4ebaf07 100755
--- a/build/run-tests.sh
+++ b/build/run-tests.sh
@@ -108,6 +108,7 @@ sdk/go/asyncbuf
 sdk/go/stats
 sdk/go/crunchrunner
 sdk/cwl
+sdk/R
 tools/sync-groups
 tools/crunchstat-summary
 tools/keep-exercise
@@ -132,6 +133,7 @@ VENV3DIR=
 PYTHONPATH=
 GEMHOME=
 PERLINSTALLBASE=
+R_LIBS=
 
 short=
 only_install=
@@ -239,6 +241,14 @@ sanity_checks() {
     which Xvfb || fatal "No xvfb. Try: apt-get install xvfb"
     echo -n 'graphviz: '
     dot -V || fatal "No graphviz. Try: apt-get install graphviz"
+
+    # R SDK stuff
+    echo -n 'R: '
+    which R || fatal "No R. Try: apt-get install r-base"
+    echo -n 'testthat: '
+    R -q -e "library('testthat')" || fatal "No testthat. Try: apt-get install r-cran-testthat"
+    # needed for roxygen2, needed for devtools, needed for R sdk
+    pkg-config --exists libxml-2.0 || fatal "No libxml2. Try: apt-get install libxml2-dev"
 }
 
 rotate_logfile() {
@@ -367,7 +377,7 @@ if [[ -z "$temp" ]]; then
 fi
 
 # Set up temporary install dirs (unless existing dirs were supplied)
-for tmpdir in VENVDIR VENV3DIR GOPATH GEMHOME PERLINSTALLBASE
+for tmpdir in VENVDIR VENV3DIR GOPATH GEMHOME PERLINSTALLBASE R_LIBS
 do
     if [[ -z "${!tmpdir}" ]]; then
         eval "$tmpdir"="$temp/$tmpdir"
@@ -476,6 +486,7 @@ setup_virtualenv() {
 export PERLINSTALLBASE
 export PERLLIB="$PERLINSTALLBASE/lib/perl5:${PERLLIB:+$PERLLIB}"
 
+export R_LIBS
 
 export GOPATH
 mkdir -p "$GOPATH/src/git.curoverse.com"
@@ -765,6 +776,21 @@ install_ruby_sdk() {
 }
 do_install sdk/ruby ruby_sdk
 
+install_R_sdk() {
+    cd "$WORKSPACE/sdk/R" \
+       && R --quiet --vanilla <<EOF
+options(repos=structure(c(CRAN="http://cran.wustl.edu/")))
+if (!requireNamespace("devtools")) {
+  install.packages("devtools")
+}
+if (!requireNamespace("roxygen2")) {
+  install.packages("roxygen2")
+}
+devtools::install_dev_deps()
+EOF
+}
+do_install sdk/R R_sdk
+
 install_perl_sdk() {
     cd "$WORKSPACE/sdk/perl" \
         && perl Makefile.PL INSTALL_BASE="$PERLINSTALLBASE" \
@@ -935,6 +961,12 @@ test_ruby_sdk() {
 }
 do_test sdk/ruby ruby_sdk
 
+test_R_sdk() {
+    cd "$WORKSPACE/sdk/R" \
+        && R --quiet --file=run_test.R
+}
+do_test sdk/R R_sdk
+
 test_cli() {
     cd "$WORKSPACE/sdk/cli" \
         && mkdir -p /tmp/keep \
diff --git a/sdk/R/run_test.R b/sdk/R/run_test.R
new file mode 100644
index 0000000..1f8931d
--- /dev/null
+++ b/sdk/R/run_test.R
@@ -0,0 +1,7 @@
+results <- devtools::test()
+any_error <- any(as.data.frame(results)$error)
+if (any_error) {
+  q("no", 1)
+} else {
+  q("no", 0)
+}
diff --git a/tools/arvbox/lib/arvbox/docker/Dockerfile.base b/tools/arvbox/lib/arvbox/docker/Dockerfile.base
index 18d430d..c95bc48 100644
--- a/tools/arvbox/lib/arvbox/docker/Dockerfile.base
+++ b/tools/arvbox/lib/arvbox/docker/Dockerfile.base
@@ -19,7 +19,7 @@ RUN apt-get update && \
     apt-transport-https ca-certificates slurm-wlm \
     linkchecker python3-virtualenv python-virtualenv xvfb iceweasel \
     libgnutls28-dev python3-dev vim cadaver cython gnupg dirmngr \
-    libsecret-1-dev && \
+    libsecret-1-dev r-base r-cran-testthat libxml2-dev && \
     apt-get clean
 
 ENV RUBYVERSION_MINOR 2.3

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list