X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/fd5d197916b117386fbe872790ff6493326c4ea2..56b6ea6226bff623e2fcd277733cceb219ea5b5c:/build/run-tests.sh?ds=sidebyside diff --git a/build/run-tests.sh b/build/run-tests.sh index 0daf80f767..6f8f117744 100755 --- a/build/run-tests.sh +++ b/build/run-tests.sh @@ -80,6 +80,7 @@ lib/controller lib/crunchstat lib/cloud lib/cloud/azure +lib/cloud/cloudtest lib/dispatchcloud lib/dispatchcloud/container lib/dispatchcloud/scheduler @@ -105,6 +106,7 @@ services/crunch-dispatch-slurm services/ws sdk/cli sdk/pam +sdk/pam:py3 sdk/python sdk/python:py3 sdk/ruby @@ -647,23 +649,8 @@ install_env() { ln -vsfT "$WORKSPACE" "$GOPATH/src/git.curoverse.com/arvados.git" go get -v github.com/kardianos/govendor cd "$GOPATH/src/git.curoverse.com/arvados.git" - if [[ -n "$short" ]]; then - go get -v -d ... - "$GOPATH/bin/govendor" sync - else - # Remove cached source dirs in workdir. Otherwise, they will - # not qualify as +missing or +external below, and we won't be - # able to detect that they're missing from vendor/vendor.json. - rm -rf vendor/*/ - go get -v -d ... - "$GOPATH/bin/govendor" sync - [[ -z $("$GOPATH/bin/govendor" list +unused +missing +external | tee /dev/stderr) ]] \ - || fatal "vendor/vendor.json has unused or missing dependencies -- try: - -(export GOPATH=\"${GOPATH}\"; cd \$GOPATH/src/git.curoverse.com/arvados.git && \$GOPATH/bin/govendor add +missing +external && \$GOPATH/bin/govendor remove +unused) - -"; - fi + go get -v -d ... + "$GOPATH/bin/govendor" sync ) || fatal "Go setup failed" setup_virtualenv "$VENVDIR" --python python2.7 @@ -748,7 +735,7 @@ do_test() { services/api) stop_services ;; - gofmt | doc | lib/cli | lib/cloud/azure | lib/cloud/ec2 | lib/cmd | lib/dispatchcloud/ssh_executor | lib/dispatchcloud/worker) + gofmt | govendor | doc | lib/cli | lib/cloud/azure | lib/cloud/ec2 | lib/cloud/cloudtest | lib/cmd | lib/dispatchcloud/ssh_executor | lib/dispatchcloud/worker) # don't care whether services are running ;; *) @@ -903,7 +890,7 @@ install_gem() { && cd "$WORKSPACE/$srcpath" \ && bundle_install_trylocal \ && gem build "$gemname.gemspec" \ - && with_test_gemset gem install --no-ri --no-rdoc $(ls -t "$gemname"-*.gem|head -n1) + && with_test_gemset gem install --no-document $(ls -t "$gemname"-*.gem|head -n1) } install_sdk/ruby() { @@ -1006,6 +993,7 @@ gostuff=( lib/cloud lib/cloud/azure lib/cloud/ec2 + lib/cloud/cloudtest lib/config lib/dispatchcloud lib/dispatchcloud/container @@ -1066,6 +1054,27 @@ test_gofmt() { [[ -z "$(gofmt -e -d $dirs | tee -a /dev/stderr)" ]] } +test_govendor() { + ( + set -e + cd "$GOPATH/src/git.curoverse.com/arvados.git" + # Remove cached source dirs in workdir. Otherwise, they will + # not qualify as +missing or +external below, and we won't be + # able to detect that they're missing from vendor/vendor.json. + rm -rf vendor/*/ + go get -v -d ... + "$GOPATH/bin/govendor" sync + if [[ -n $("$GOPATH/bin/govendor" list +unused +missing +external | tee /dev/stderr) ]]; then + echo >&2 "vendor/vendor.json has unused or missing dependencies -- try: + +(export GOPATH=\"${GOPATH}\"; cd \$GOPATH/src/git.curoverse.com/arvados.git && \$GOPATH/bin/govendor add +missing +external && \$GOPATH/bin/govendor remove +unused) + +" + return 1 + fi + ) +} + test_services/api() { rm -f "$WORKSPACE/services/api/git-commit.version" cd "$WORKSPACE/services/api" \ @@ -1186,6 +1195,7 @@ test_all() { fi do_test gofmt + do_test govendor do_test doc do_test sdk/ruby do_test sdk/R @@ -1245,6 +1255,8 @@ for p in "${pythonstuff[@]}"; do testfuncargs[$dir:py3]="$dir pip $VENV3DIR/bin/" done +testfuncargs["sdk/cli"]="sdk/cli" + if [[ -z ${interactive} ]]; then install_all test_all