X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/a7a6c3931e0ec3fad3034b1c457407fb13861633..95c835b12a32a5fa6dc94799d6fea16e5b20080c:/build/run-tests.sh diff --git a/build/run-tests.sh b/build/run-tests.sh index 17728c5342..b8d2081e6e 100755 --- a/build/run-tests.sh +++ b/build/run-tests.sh @@ -636,13 +636,15 @@ install_env() { setup_virtualenv "$VENV3DIR" . "$VENV3DIR/bin/activate" + # wheel modernizes the venv (as of early 2024) and makes it more closely + # match our package build environment. # PyYAML is a test requirement used by run_test_server.py and needed for # other, non-Python tests. # pdoc is needed to build PySDK documentation. # We run `setup.py build` first to generate _version.py. - env -C "$WORKSPACE/sdk/python" python3 setup.py build \ - && python3 -m pip install "$WORKSPACE/sdk/python" \ - && python3 -m pip install PyYAML pdoc \ + pip install PyYAML pdoc wheel \ + && env -C "$WORKSPACE/sdk/python" python3 setup.py build \ + && pip install "$WORKSPACE/sdk/python" \ || fatal "installing Python SDK and related dependencies failed" } @@ -689,6 +691,7 @@ do_test() { check_arvados_config "$1" ;; gofmt \ + | arvados_version.py \ | cmd/arvados-package \ | doc \ | lib/boot \ @@ -971,11 +974,14 @@ install_services/api() { declare -a pythonstuff pythonstuff=( + # The ordering of sdk/python, tools/crunchstat-summary, and + # sdk/cwl here is significant. See + # https://dev.arvados.org/issues/19744#note-26 sdk/python:py3 + tools/crunchstat-summary:py3 sdk/cwl:py3 services/dockercleaner:py3 services/fuse:py3 - tools/crunchstat-summary:py3 ) declare -a gostuff @@ -987,14 +993,13 @@ install_services/workbench2() { } test_doc() { - ( - set -e - cd "$WORKSPACE/doc" - ARVADOS_API_HOST=pirca.arvadosapi.com - # Make sure python-epydoc is installed or the next line won't - # do much good! - PYTHONPATH=$WORKSPACE/sdk/python/ "$bundle" exec rake linkchecker baseurl=file://$WORKSPACE/doc/.site/ arvados_workbench_host=https://workbench.$ARVADOS_API_HOST arvados_api_host=$ARVADOS_API_HOST ${testargs[doc]} - ) + local arvados_api_host=pirca.arvadosapi.com && \ + env -C "$WORKSPACE/doc" \ + "$bundle" exec rake linkchecker \ + arvados_api_host="$arvados_api_host" \ + arvados_workbench_host="https://workbench.$arvados_api_host" \ + baseurl="file://$WORKSPACE/doc/.site/" \ + ${testargs[doc]} } test_gofmt() { @@ -1004,6 +1009,23 @@ test_gofmt() { go vet -composites=false ./... } +test_arvados_version.py() { + local orig_fn="" + local fail_count=0 + while read -d "" fn; do + if [[ -z "$orig_fn" ]]; then + orig_fn="$fn" + elif ! cmp "$orig_fn" "$fn"; then + fail_count=$(( $fail_count + 1 )) + printf "FAIL: %s and %s are not identical\n" "$orig_fn" "$fn" + fi + done < <(git -C "$WORKSPACE" ls-files -z | grep -z '/arvados_version\.py$') + case "$orig_fn" in + "") return 66 ;; # EX_NOINPUT + *) return "$fail_count" ;; + esac +} + test_services/api() { rm -f "$WORKSPACE/services/api/git-commit.version" cd "$WORKSPACE/services/api" \ @@ -1054,11 +1076,14 @@ install_deps() { # Install parts needed by test suites do_install env do_install cmd/arvados-server go - do_install sdk/cli - do_install sdk/python pip "${VENV3DIR}/bin/" + do_install tools/crunchstat-summary pip "${VENV3DIR}/bin/" do_install sdk/ruby-google-api-client do_install sdk/ruby + do_install sdk/cli do_install services/api + # lib/controller integration tests depend on arv-mount to run + # containers. + do_install services/fuse pip "${VENV3DIR}/bin/" do_install services/keepproxy go do_install services/keep-web go } @@ -1098,6 +1123,7 @@ test_all() { fi do_test gofmt + do_test arvados_version.py do_test doc do_test sdk/ruby-google-api-client do_test sdk/ruby