X-Git-Url: https://git.arvados.org/arvados-dev.git/blobdiff_plain/0b16f3e4e4beccf000f04f63129276e0716c141c..27d5f6ed785b6e127cf9a2f1145fac21627a9a89:/jenkins/run-tests.sh diff --git a/jenkins/run-tests.sh b/jenkins/run-tests.sh index 1db3857..40a6daa 100755 --- a/jenkins/run-tests.sh +++ b/jenkins/run-tests.sh @@ -20,7 +20,8 @@ Options: from a previous invocation if you use this option. WORKSPACE=path Arvados source tree to test. CONFIGSRC=path Dir with api server config files to copy into source tree. -apiserver_test="TEST=test/functional/arvados/v1/collections_test.rb" + (If none given, leave config files alone in source tree.) +apiserver_test="TEST=test/functional/arvados/v1/collections_controller_test.rb" Restrict apiserver tests to the given file python_sdk_test="--test-suite test.test_keep_locator" Restrict Python SDK tests to the given class @@ -36,6 +37,9 @@ into \$GOPATH, \$VENDIR, and \$GEMHOME before running any tests. Many test suites depend on other components being installed, and installing everything tends to be quicker than debugging dependencies. +As a special concession to the current CI server config, CONFIGSRC +defaults to $HOME/arvados-api-server if that directory exists. + More information and background: https://arvados.org/projects/arvados/wiki/Running_tests @@ -84,7 +88,7 @@ clear_temp() { leaving+=" $var=\"${!var}\"" fi done - if [[ -z "$leaving" ]]; then + if [[ -n "$leaving" ]]; then echo "Leaving behind temp dirs: $leaving" fi } @@ -143,7 +147,7 @@ do leave_temp[GEMHOME]=1 ;; *=*) - eval $(echo $arg | cut -d= -f1)=\"$(echo $arg | cut -d= -f2-)\" + eval export $(echo $arg | cut -d= -f1)=\"$(echo $arg | cut -d= -f2-)\" ;; *) echo >&2 "$0: Unrecognized option: '$arg'. Try: $0 --help" @@ -156,13 +160,15 @@ done echo "WORKSPACE=$WORKSPACE" [[ -n "$WORKSPACE" ]] || fatal "WORKSPACE not set" -if [[ -n "$CONFIGSRC" ]]; then - if [[ -d "$HOME/arvados-api-server" ]]; then - # Jenkins expects us to use this by default. - CONFIGSRC="$HOME/arvados-api-server" - fi +if [[ -z "$CONFIGSRC" ]] && [[ -d "$HOME/arvados-api-server" ]]; then + # Jenkins expects us to use this by default. + CONFIGSRC="$HOME/arvados-api-server" fi +# Clean up .pyc files that may exist in the workspace +cd "$WORKSPACE" +find -name '*.pyc' -delete + # Set up temporary install dirs (unless existing dirs were supplied) for tmpdir in VENVDIR GOPATH GEMHOME do @@ -179,7 +185,7 @@ ln -sfn "$WORKSPACE" "$GOPATH/src/git.curoverse.com/arvados.git" \ || fatal "symlink failed" virtualenv --setuptools "$VENVDIR" || fatal "virtualenv $VENVDIR failed" -PATH="$VENVDIR/bin:$PATH" +. "$VENVDIR/bin/activate" checkexit() { if [[ "$?" != "0" ]]; then @@ -260,7 +266,6 @@ do_install ruby_sdk install_cli() { cd "$WORKSPACE/sdk/cli" \ - && HOME="$GEMHOME" bundle install --no-deployment \ && gem build arvados-cli.gemspec \ && HOME="$GEMHOME" gem install --user-install --no-ri --no-rdoc `ls -t arvados-cli-*.gem|head -n1` } @@ -274,14 +279,14 @@ install_python_sdk() { # keepproxy). cd "$WORKSPACE/sdk/python" \ - && python setup.py egg_info -b ".$(git log --format=format:%ct.%h -n1 .)" sdist rotate --keep=1 --match .tar.gz \ + && python setup.py sdist rotate --keep=1 --match .tar.gz \ && pip install dist/arvados-python-client-0.1.*.tar.gz } do_install python_sdk install_fuse() { cd "$WORKSPACE/services/fuse" \ - && python setup.py egg_info -b ".$(git log --format=format:%ct.%h -n1 .)" sdist rotate --keep=1 --match .tar.gz \ + && python setup.py sdist rotate --keep=1 --match .tar.gz \ && pip install dist/arvados_fuse-0.1.*.tar.gz } do_install fuse @@ -336,6 +341,7 @@ do_install apiserver declare -a gostuff gostuff=( + services/crunchstat services/keepstore services/keepproxy sdk/go/arvadosclient @@ -400,6 +406,11 @@ test_fuse() { } do_test fuse +test_nodemanager() { + cd "$WORKSPACE/services/nodemanager" && python setup.py test +} +do_test nodemanager + for g in "${gostuff[@]}" do do_test "$g" go