X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/a12e4d36901ab3b3027f1168f1ea06b26122829e..41d2a628e63699d62c3ab2ba616732153e98f49b:/build/run-tests.sh diff --git a/build/run-tests.sh b/build/run-tests.sh index 636c0306ca..749075d815 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,12 @@ lib/cli lib/cmd lib/controller lib/crunchstat +lib/cloud 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 +106,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 +250,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 +278,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 +297,7 @@ do skip[$1]=1; shift ;; --only) - only="$1"; skip[$1]=""; shift + only[$1]=1; skip[$1]=""; shift ;; --short) short=1 @@ -331,14 +340,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 @@ -658,9 +672,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 +694,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 +746,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 +762,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 +930,15 @@ gostuff=( lib/cmd lib/controller lib/crunchstat + lib/cloud 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