X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/467722fb20db289fa1eb0833e2d87ee56ed91ba7..8e2a634e2b0ef180f30db5322233244b142f93f6:/build/run-tests.sh diff --git a/build/run-tests.sh b/build/run-tests.sh index f6c6e8f553..d18250a95a 100755 --- a/build/run-tests.sh +++ b/build/run-tests.sh @@ -69,7 +69,12 @@ apps/workbench_functionals (*) apps/workbench_integration (*) apps/workbench_benchmark apps/workbench_profile +cmd/arvados-client doc +lib/cli +lib/cmd +lib/crunchstat +lib/dispatchcloud services/api services/arv-git-httpd services/crunchstat @@ -104,6 +109,7 @@ sdk/go/asyncbuf sdk/go/stats sdk/go/crunchrunner sdk/cwl +sdk/R tools/sync-groups tools/crunchstat-summary tools/keep-exercise @@ -128,6 +134,7 @@ VENV3DIR= PYTHONPATH= GEMHOME= PERLINSTALLBASE= +R_LIBS= short= only_install= @@ -235,6 +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() { @@ -363,7 +380,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" @@ -472,13 +489,37 @@ setup_virtualenv() { export PERLINSTALLBASE export PERLLIB="$PERLINSTALLBASE/lib/perl5:${PERLLIB:+$PERLLIB}" +export R_LIBS + export GOPATH mkdir -p "$GOPATH/src/git.curoverse.com" -rmdir --parents "$GOPATH/src/git.curoverse.com/arvados.git/tmp/GOPATH" -ln -snfT "$WORKSPACE" "$GOPATH/src/git.curoverse.com/arvados.git" \ +rmdir -v --parents --ignore-fail-on-non-empty "$GOPATH/src/git.curoverse.com/arvados.git/tmp/GOPATH" +for d in \ + "$GOPATH/src/git.curoverse.com/arvados.git/arvados.git" \ + "$GOPATH/src/git.curoverse.com/arvados.git"; do + [[ -d "$d" ]] && rmdir "$d" + [[ -h "$d" ]] && rm "$d" +done +ln -vsnfT "$WORKSPACE" "$GOPATH/src/git.curoverse.com/arvados.git" \ || fatal "symlink failed" go get -v github.com/kardianos/govendor \ || fatal "govendor install failed" +cd "$GOPATH/src/git.curoverse.com/arvados.git" \ + || fatal +# Remove cached source dirs in workdir. Otherwise, they won't qualify +# as +missing or +external below, and we won't be able to detect that +# they're missing from vendor/vendor.json. +rm -r vendor/*/ +go get -v -d ... +"$GOPATH/bin/govendor" sync \ + || fatal "govendor sync failed" +[[ -z $("$GOPATH/bin/govendor" list +unused +missing +external | tee /dev/stderr) ]] \ + || fatal "vendor/vendor.json has unused or missing dependencies -- try: +* govendor remove +unused +* govendor add +missing +external +" +cd "$WORKSPACE" + setup_virtualenv "$VENVDIR" --python python2.7 . "$VENVDIR/bin/activate" @@ -492,6 +533,7 @@ pip freeze 2>/dev/null | egrep ^PyYAML= \ # won't pick it up by default. pip freeze 2>/dev/null | egrep ^apache-libcloud==$LIBCLOUD_PIN \ || pip install --pre --ignore-installed https://github.com/curoverse/libcloud/archive/apache-libcloud-$LIBCLOUD_PIN.zip >/dev/null \ + || pip install apache-libcloud>=$LIBCLOUD_PIN >/dev/null \ || fatal "pip install apache-libcloud failed" # We need an unreleased (as of 2017-08-17) llfuse bugfix, otherwise our fuse test suite deadlocks. @@ -738,6 +780,12 @@ install_ruby_sdk() { } do_install sdk/ruby ruby_sdk +install_R_sdk() { + cd "$WORKSPACE/sdk/R" \ + && R --quiet --vanilla --file=install_deps.R +} +do_install sdk/R R_sdk + install_perl_sdk() { cd "$WORKSPACE/sdk/perl" \ && perl Makefile.PL INSTALL_BASE="$PERLINSTALLBASE" \ @@ -824,11 +872,13 @@ install_apiserver() { } do_install services/api apiserver -cd "$GOPATH/src/git.curoverse.com/arvados.git" && \ - "$GOPATH/bin/govendor" sync -v || \ - fatal "govendor sync failed" declare -a gostuff gostuff=( + cmd/arvados-client + lib/cli + lib/cmd + lib/crunchstat + lib/dispatchcloud sdk/go/arvados sdk/go/arvadosclient sdk/go/blockdigest @@ -839,7 +889,6 @@ gostuff=( sdk/go/asyncbuf sdk/go/crunchrunner sdk/go/stats - lib/crunchstat services/arv-git-httpd services/crunchstat services/health @@ -908,6 +957,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 \