keep is now called keepstore
[arvados.git] / jenkins / run-tests.sh
index f52b5855790aa2176784b1fba4e415db9093fdf9..e9241501f760dbe5c333c871d0ad5deebfdc5f40 100755 (executable)
@@ -39,15 +39,19 @@ checkexit() {
     fi
 }
 
+goget() {
+    go get -t "git.curoverse.com/arvados.git/$1"
+    checkexit "$1 install"
+}
+
 gotest() {
-  title "Starting $1 tests"
-  cd "$WORKSPACE"
+    title "Starting $1 tests"
+    cd "$WORKSPACE"
 
-  go get -t "git.curoverse.com/arvados.git/$1" \
-  && go test "git.curoverse.com/arvados.git/$1"
+    go test "git.curoverse.com/arvados.git/$1"
 
-  checkexit "$1 tests"
-  title "$1 tests complete"
+    checkexit "$1 tests"
+    title "$1 tests complete"
 }
 
 checkexit "Doc build"
@@ -113,53 +117,71 @@ bundle exec rake test
 checkexit "API server tests"
 title "API server tests complete"
 
-# Keepstore. The keepstore binary is used by many other test suites,
-# so we test and install it early.
-
-gotest services/keepstore
-
-# Python SDK
+# Install CLI gem's dependencies.
 
-cd "$WORKSPACE"
-cd sdk/cli
+cd "$WORKSPACE/sdk/cli"
 bundle install --deployment
 
-# Set up Python SDK and dependencies
-
-title "Starting Python SDK tests"
 cd "$WORKSPACE"
-cd sdk/python
+gostuff="services/keepstore services/keepproxy sdk/go/arvadosclient sdk/go/keepclient sdk/go/streamer"
+for dir in $gostuff
+do
+  goget "$dir"
+done
 
-python setup.py test
-
-checkexit "Python SDK tests"
+# 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).
 
+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
 
 checkexit "Python SDK install"
 
-cd "$WORKSPACE"
-cd services/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
+pip install dist/arvados_fuse-0.1.*.tar.gz
+
+checkexit "FUSE install"
+
+# 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.
+
+title "Starting Python SDK tests"
+cd "$WORKSPACE/sdk/python"
 
-# We reuse $VENVDIR from the Python SDK tests above
 python setup.py test
+checkexit "Python SDK tests"
+easy_install *.egg
+
+title "Python tests complete"
 
+# FUSE driver
+
+title "Starting FUSE tests"
+cd "$WORKSPACE/services/fuse"
+
+python setup.py test
 checkexit "FUSE tests"
+easy_install *.egg
 
-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
+title "FUSE tests complete"
 
-checkexit "FUSE install"
 
-title "Python SDK tests complete"
+# Go SDK packages
 
-for dir in services/keepproxy sdk/go/arvadosclient sdk/go/keepclient sdk/go/streamer
+for dir in $gostuff
 do
   gotest "$dir"
-end
+done
 
-# WORKBENCH
+# Workbench
 title "Starting workbench tests"
 cd "$WORKSPACE"
 cd apps/workbench
@@ -179,6 +201,8 @@ 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"