X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/ebb7681e5cf4bc2825e8786ecda895e219158703..fb9f29b33a380616211a56973045dac1254977ee:/build/run-tests.sh diff --git a/build/run-tests.sh b/build/run-tests.sh index 636c0306ca..095d32eaae 100755 --- a/build/run-tests.sh +++ b/build/run-tests.sh @@ -37,7 +37,7 @@ CONFIGSRC=path Dir with api server config files to copy into source tree. (If none given, leave config files alone in source tree.) services/api_test="TEST=test/functional/arvados/v1/collections_controller_test.rb" Restrict apiserver tests to the given file -sdk/python_test="--test-suite test.test_keep_locator" +sdk/python_test="--test-suite tests.test_keep_locator" Restrict Python SDK tests to the given class apps/workbench_test="TEST=test/integration/pipeline_instances_test.rb" Restrict Workbench tests to the given file @@ -76,7 +76,13 @@ lib/cli lib/cmd lib/controller lib/crunchstat +lib/cloud +lib/cloud/azure lib/dispatchcloud +lib/dispatchcloud/container +lib/dispatchcloud/scheduler +lib/dispatchcloud/ssh_executor +lib/dispatchcloud/worker services/api services/arv-git-httpd services/crunchstat @@ -101,6 +107,7 @@ sdk/python:py3 sdk/ruby sdk/go/arvados sdk/go/arvadosclient +sdk/go/auth sdk/go/dispatch sdk/go/keepclient sdk/go/health @@ -244,6 +251,8 @@ 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" + echo -n 'geckodriver: ' + geckodriver --version | grep ^geckodriver || echo "No geckodriver. Try: wget -O- https://github.com/mozilla/geckodriver/releases/download/v0.23.0/geckodriver-v0.23.0-linux64.tar.gz | sudo tar -C /usr/local/bin -xzf - geckodriver" if [[ "$NEED_SDK_R" = true ]]; then # R SDK stuff @@ -270,6 +279,7 @@ rotate_logfile() { declare -a failures declare -A skip +declare -A only declare -A testargs skip[apps/workbench_profile]=1 # nodemanager_integration tests are not reliable, see #12061. @@ -288,7 +298,7 @@ do skip[$1]=1; shift ;; --only) - only="$1"; skip[$1]=""; shift + only[$1]=1; skip[$1]=""; shift ;; --short) short=1 @@ -331,14 +341,19 @@ done # required when testing it. Skip that step if it is not needed. NEED_SDK_R=true -if [[ ! -z "${only}" && "${only}" != "sdk/R" ]]; then +if [[ ${#only[@]} -ne 0 ]] && + [[ -z "${only['sdk/R']}" && -z "${only['doc']}" ]]; then NEED_SDK_R=false fi -if [[ ! -z "${skip}" && "${skip}" == "sdk/R" ]]; then +if [[ ${skip["sdk/R"]} == 1 && ${skip["doc"]} == 1 ]]; then NEED_SDK_R=false fi +if [[ $NEED_SDK_R == false ]]; then + echo "R SDK not needed, it will not be installed." +fi + start_services() { echo 'Starting API, keepproxy, keep-web, ws, arv-git-httpd, and nginx ssl proxy...' if [[ ! -d "$WORKSPACE/services/api/log" ]]; then @@ -514,7 +529,7 @@ setup_virtualenv() { } export PERLINSTALLBASE -export PERLLIB="$PERLINSTALLBASE/lib/perl5:${PERLLIB:+$PERLLIB}" +export PERL5LIB="$PERLINSTALLBASE/lib/perl5${PERL5LIB:+:$PERL5LIB}" export R_LIBS @@ -522,7 +537,6 @@ export GOPATH ( set -e mkdir -p "$GOPATH/src/git.curoverse.com" - rmdir -v --parents --ignore-fail-on-non-empty "${temp}/GOPATH" if [[ ! -h "$GOPATH/src/git.curoverse.com/arvados.git" ]]; then for d in \ "$GOPATH/src/git.curoverse.com/arvados.git/tmp/GOPATH" \ @@ -582,6 +596,7 @@ pythonstuff=( sdk/python sdk/python:py3 sdk/cwl + sdk/cwl:py3 services/dockercleaner:py3 services/fuse services/nodemanager @@ -658,9 +673,9 @@ do_test() { ;; esac if [[ -z "${skip[$suite]}" && -z "${skip[$1]}" && \ - (-z "${only}" || "${only}" == "${suite}" || \ - "${only}" == "${1}") || - "${only}" == "${2}" ]]; then + (${#only[@]} -eq 0 || ${only[$suite]} -eq 1 || \ + ${only[$1]} -eq 1) || + ${only[$2]} -eq 1 ]]; then retry do_test_once ${@} else title "Skipping ${1} tests" @@ -680,7 +695,7 @@ do_test_once() { # before trying "go test". Otherwise, coverage-reporting # mode makes Go show the wrong line numbers when reporting # compilation errors. - go get -t "git.curoverse.com/arvados.git/$1" && \ + go get -ldflags "-X main.version=${ARVADOS_VERSION:-$(git log -n1 --format=%H)-dev}" -t "git.curoverse.com/arvados.git/$1" && \ cd "$GOPATH/src/git.curoverse.com/arvados.git/$1" && \ [[ -z "$(gofmt -e -d . | tee /dev/stderr)" ]] && \ if [[ -n "${testargs[$1]}" ]] @@ -732,7 +747,7 @@ do_test_once() { do_install() { skipit=false - if [[ -z "${only_install}" || "${only_install}" == "${1}" ]]; then + if [[ -z "${only_install}" || "${only_install}" == "${1}" || "${only_install}" == "${2}" ]]; then retry do_install_once ${@} else skipit=true @@ -748,7 +763,7 @@ do_install_once() { timer_reset if [[ "$2" == "go" ]] then - go get -t "git.curoverse.com/arvados.git/$1" + go get -ldflags "-X main.version=${ARVADOS_VERSION:-$(git log -n1 --format=%H)-dev}" -t "git.curoverse.com/arvados.git/$1" elif [[ "$2" == "pip" ]] then # $3 can name a path directory for us to use, including trailing @@ -916,9 +931,17 @@ gostuff=( lib/cmd lib/controller lib/crunchstat + lib/cloud + lib/cloud/azure + lib/cloud/ec2 lib/dispatchcloud + lib/dispatchcloud/container + lib/dispatchcloud/scheduler + lib/dispatchcloud/ssh_executor + lib/dispatchcloud/worker sdk/go/arvados sdk/go/arvadosclient + sdk/go/auth sdk/go/blockdigest sdk/go/dispatch sdk/go/health