12199: Merge branch 'master' into 12199-dispatch-to-node-type
authorTom Clegg <tclegg@veritasgenetics.com>
Mon, 12 Feb 2018 22:28:22 +0000 (17:28 -0500)
committerTom Clegg <tclegg@veritasgenetics.com>
Mon, 12 Feb 2018 22:28:22 +0000 (17:28 -0500)
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg@veritasgenetics.com>

1  2 
build/run-tests.sh

diff --combined build/run-tests.sh
index 57ce41e3a52b1e57bf1ec9e2afbb5c2f173de9ae,ec3c4637703abdd4749d6efd00980f854c6ee02f..1ef15cd3dbe9974f2fe37619f06845b8964a4ecf
@@@ -77,7 -77,6 +77,7 @@@ lib/crunchsta
  services/api
  services/arv-git-httpd
  services/crunchstat
 +services/dispatchcloud
  services/dockercleaner
  services/fuse
  services/health
@@@ -109,6 -108,7 +109,7 @@@ sdk/go/asyncbu
  sdk/go/stats
  sdk/go/crunchrunner
  sdk/cwl
+ sdk/R
  tools/sync-groups
  tools/crunchstat-summary
  tools/keep-exercise
@@@ -133,6 -133,7 +134,7 @@@ VENV3DIR
  PYTHONPATH=
  GEMHOME=
  PERLINSTALLBASE=
+ R_LIBS=
  
  short=
  only_install=
@@@ -240,6 -241,16 +242,16 @@@ 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"
+     # needed for pkgdown, builds R SDK doc pages
+     which pandoc || fatal "No pandoc. Try: apt-get install pandoc"
  }
  
  rotate_logfile() {
@@@ -368,7 -379,7 +380,7 @@@ if [[ -z "$temp" ]]; the
  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"
@@@ -477,6 -488,7 +489,7 @@@ setup_virtualenv() 
  export PERLINSTALLBASE
  export PERLLIB="$PERLINSTALLBASE/lib/perl5:${PERLLIB:+$PERLLIB}"
  
+ export R_LIBS
  
  export GOPATH
  mkdir -p "$GOPATH/src/git.curoverse.com"
@@@ -766,6 -778,24 +779,24 @@@ 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")
+ }
+ if (!requireNamespace("pkgdown")) {
+   devtools::install_github("hadley/pkgdown")
+ }
+ devtools::install_dev_deps()
+ EOF
+ }
+ do_install sdk/R R_sdk
  install_perl_sdk() {
      cd "$WORKSPACE/sdk/perl" \
          && perl Makefile.PL INSTALL_BASE="$PERLINSTALLBASE" \
@@@ -870,7 -900,6 +901,7 @@@ gostuff=
      sdk/go/stats
      services/arv-git-httpd
      services/crunchstat
 +    services/dispatchcloud
      services/health
      services/keep-web
      services/keepstore
@@@ -937,6 -966,12 +968,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 \