X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/d9b0e6003e265412de46174ea0e2705a8e872f2b..2d816cf50f92cb6d984a8821f6c6ddd621f5140b:/jenkins/run-tests.sh diff --git a/jenkins/run-tests.sh b/jenkins/run-tests.sh index bee8002864..e9241501f7 100755 --- a/jenkins/run-tests.sh +++ b/jenkins/run-tests.sh @@ -17,6 +17,10 @@ export GOPATH=$(mktemp -d) mkdir -p "$GOPATH/src/git.curoverse.com" ln -sfn "$WORKSPACE" "$GOPATH/src/git.curoverse.com/arvados.git" +VENVDIR=$(mktemp -d) +virtualenv --setuptools "$VENVDIR" +PATH="$VENVDIR/bin:$PATH" + # DOCS title "Starting DOC build" cd "$WORKSPACE" @@ -35,6 +39,21 @@ checkexit() { fi } +goget() { + go get -t "git.curoverse.com/arvados.git/$1" + checkexit "$1 install" +} + +gotest() { + title "Starting $1 tests" + cd "$WORKSPACE" + + go test "git.curoverse.com/arvados.git/$1" + + checkexit "$1 tests" + title "$1 tests complete" +} + checkexit "Doc build" title "DOC build complete" @@ -98,77 +117,92 @@ bundle exec rake test checkexit "API server tests" title "API server tests complete" -# Install and test Go bits. keepstore must come before keepproxy and keepclient. -for dir in services/keepstore services/keepproxy sdk/go/arvadosclient sdk/go/keepclient sdk/go/streamer -do - title "Starting $dir tests" - cd "$WORKSPACE" +# Install CLI gem's dependencies. - go get -t "git.curoverse.com/arvados.git/$dir" \ - && go test "git.curoverse.com/arvados.git/$dir" +cd "$WORKSPACE/sdk/cli" +bundle install --deployment - checkexit "$dir tests" - title "$dir tests complete" +cd "$WORKSPACE" +gostuff="services/keepstore services/keepproxy sdk/go/arvadosclient sdk/go/keepclient sdk/go/streamer" +for dir in $gostuff +do + goget "$dir" done +# Install the Python SDK early. Various other test suites (like +# keepproxy) bring up run_test_server.py, which imports the arvados +# module. We can't actually *test* the Python SDK yet though, because +# its own test suite brings up some of those other programs (like +# keepproxy). -# WORKBENCH -title "Starting workbench tests" -cd "$WORKSPACE" -cd apps/workbench -bundle install --deployment +cd "$WORKSPACE/sdk/python" +python setup.py egg_info -b ".$(git log --format=format:%ct.%h -n1 .)" sdist rotate --keep=1 --match .tar.gz +pip install dist/arvados-python-client-0.1.*.tar.gz -echo $PATH +checkexit "Python SDK install" +cd "$WORKSPACE/services/fuse" +python setup.py egg_info -b ".$(git log --format=format:%ct.%h -n1 .)" sdist rotate --keep=1 --match .tar.gz +pip install dist/arvados_fuse-0.1.*.tar.gz -bundle exec rake test +checkexit "FUSE install" -checkexit "Workbench tests" -title "Workbench tests complete" +# Python SDK. We test this before testing keepproxy: keepproxy runs +# run_test_server.py, which depends on the yaml package, which is in +# tests_require but not install_requires, and therefore does not get +# installed by setuptools until we run "setup.py test" *and* install +# the .egg files that setup.py downloads. -# Python SDK title "Starting Python SDK tests" -cd "$WORKSPACE" -cd sdk/cli -bundle install --deployment +cd "$WORKSPACE/sdk/python" -# Set up Python SDK and dependencies +python setup.py test +checkexit "Python SDK tests" +easy_install *.egg -cd "$WORKSPACE" -cd sdk/python +title "Python tests complete" -VENVDIR=$(mktemp -d) -virtualenv --setuptools "$VENVDIR" -"$VENVDIR/bin/python" setup.py test +# FUSE driver -checkexit "Python SDK tests" +title "Starting FUSE tests" +cd "$WORKSPACE/services/fuse" -"$VENVDIR/bin/python" setup.py egg_info -b ".$(git log --format=format:%ct.%h -n1 .)" sdist rotate --keep=1 --match .tar.gz -"$VENVDIR/bin/pip" install dist/arvados-python-client-0.1.*.tar.gz +python setup.py test +checkexit "FUSE tests" +easy_install *.egg -checkexit "Python SDK install" +title "FUSE tests complete" -cd "$WORKSPACE" -cd services/fuse -# We reuse $VENVDIR from the Python SDK tests above -"$VENVDIR/bin/python" setup.py test +# Go SDK packages -checkexit "FUSE tests" +for dir in $gostuff +do + gotest "$dir" +done -"$VENVDIR/bin/python" setup.py egg_info -b ".$(git log --format=format:%ct.%h -n1 .)" sdist rotate --keep=1 --match .tar.gz -"$VENVDIR/bin/pip" install dist/arvados_fuse-0.1.*.tar.gz +# Workbench +title "Starting workbench tests" +cd "$WORKSPACE" +cd apps/workbench +bundle install --deployment -checkexit "FUSE install" +echo $PATH + +bundle exec rake test -title "Python SDK tests complete" +checkexit "Workbench tests" +title "Workbench tests complete" -# Clean up $VENVDIR +# Clean up temporary virtualenv and GOPATH rm -rf "$VENVDIR" +rm -rf "$GOPATH" # The CLI SDK tests require a working API server, so let's skip those for now. exit $EXITCODE +######################################################################## + # CLI SDK title "Starting SDK CLI tests" cd "$WORKSPACE"