X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/37470b030384ebe8a73e6d1e725cbde4abb924da..5c724cffa06b5c5a809e0f6cce194a3f012c7ba3:/build/run-tests.sh diff --git a/build/run-tests.sh b/build/run-tests.sh index b6a93d4712..e254d61ee2 100755 --- a/build/run-tests.sh +++ b/build/run-tests.sh @@ -1,6 +1,9 @@ #!/bin/bash +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 -. `dirname "$(readlink -f "$0")"`/libcloud-pin +. `dirname "$(readlink -f "$0")"`/libcloud-pin.sh COLUMNS=80 . `dirname "$(readlink -f "$0")"`/run-library.sh @@ -78,6 +81,7 @@ services/keepstore services/keep-balance services/login-sync services/nodemanager +services/nodemanager_integration services/crunch-run services/crunch-dispatch-local services/crunch-dispatch-slurm @@ -91,6 +95,7 @@ sdk/go/arvados sdk/go/arvadosclient sdk/go/dispatch sdk/go/keepclient +sdk/go/health sdk/go/httpserver sdk/go/manifest sdk/go/blockdigest @@ -168,8 +173,8 @@ sanity_checks() { echo -n 'go: ' go version \ || fatal "No go binary. See http://golang.org/doc/install" - [[ $(go version) =~ go1.([0-9]+) ]] && [[ ${BASH_REMATCH[1]} -ge 7 ]] \ - || fatal "Go >= 1.7 required. See http://golang.org/doc/install" + [[ $(go version) =~ go1.([0-9]+) ]] && [[ ${BASH_REMATCH[1]} -ge 8 ]] \ + || fatal "Go >= 1.8 required. See http://golang.org/doc/install" echo -n 'gcc: ' gcc --version | egrep ^gcc \ || fatal "No gcc. Try: apt-get install build-essential" @@ -199,6 +204,8 @@ sanity_checks() { echo -n 'gitolite: ' which gitolite \ || fatal "No gitolite. Try: apt-get install gitolite3" + which npm \ + || fatal "No npm. Try: wget -O- https://nodejs.org/dist/v6.11.2/node-v6.11.2-linux-x64.tar.xz | sudo tar -C /usr/local xJf - && sudo ln -s ../node-v6.11.2-linux-x64/bin/{node,npm} /usr/local/bin/" } rotate_logfile() { @@ -463,11 +470,21 @@ 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 \ || fatal "pip install apache-libcloud failed" -# Uninstall old llfuse (<1.0), because services/fuse "pip install" -# won't upgrade it by default. -if pip freeze | egrep '^llfuse==0'; then - yes | pip uninstall 'llfuse<1.0' -fi +# We need an unreleased (as of 2017-08-17) llfuse bugfix, otherwise our fuse test suite deadlocks. +pip freeze | grep -x llfuse==1.2.0 || ( + set -e + yes | pip uninstall llfuse || true + cython --version || fatal "no cython; try sudo apt-get install cython" + cd "$temp" + (cd python-llfuse || git clone https://github.com/curoverse/python-llfuse) + cd python-llfuse + git checkout 620722fd990ea642ddb8e7412676af482c090c0c + git checkout setup.py + sed -i -e "s:'1\\.2':'1.2.0':" setup.py + python setup.py build_cython + python setup.py install --force +) || fatal "llfuse fork failed" +pip freeze | grep -x llfuse==1.2.0 || fatal "error: installed llfuse 1.2.0 but '$(pip freeze | grep llfuse)' ???" # Deactivate Python 2 virtualenv deactivate @@ -540,6 +557,9 @@ do_test() { apps/workbench_units | apps/workbench_functionals | apps/workbench_integration) suite=apps/workbench ;; + services/nodemanager | services/nodemanager_integration) + suite=services/nodemanager_suite + ;; *) suite="${1}" ;; @@ -567,7 +587,7 @@ do_test_once() { # mode makes Go show the wrong line numbers when reporting # compilation errors. go get -t "git.curoverse.com/arvados.git/$1" && \ - cd "$WORKSPACE/$1" && \ + cd "$GOPATH/src/git.curoverse.com/arvados.git/$1" && \ [[ -z "$(gofmt -e -d . | tee /dev/stderr)" ]] && \ if [[ -n "${testargs[$1]}" ]] then @@ -770,6 +790,7 @@ gostuff=( sdk/go/arvadosclient sdk/go/blockdigest sdk/go/dispatch + sdk/go/health sdk/go/httpserver sdk/go/manifest sdk/go/streamer @@ -799,7 +820,8 @@ done install_workbench() { cd "$WORKSPACE/apps/workbench" \ && mkdir -p tmp/cache \ - && RAILS_ENV=test bundle_install_trylocal + && RAILS_ENV=test bundle_install_trylocal \ + && RAILS_ENV=test RAILS_GROUPS=assets bundle exec rake npm:install } do_install apps/workbench workbench @@ -854,6 +876,12 @@ test_login-sync() { } do_test services/login-sync login-sync +test_nodemanager_integration() { + cd "$WORKSPACE/services/nodemanager" \ + && tests/integration_test.py ${testargs[services/nodemanager_integration]} +} +do_test services/nodemanager_integration nodemanager_integration + for p in "${pythonstuff[@]}" do dir=${p%:py3}