3551: Test and install keepstore before Python SDK.
authorTom Clegg <tom@curoverse.com>
Thu, 14 Aug 2014 20:30:56 +0000 (16:30 -0400)
committerTom Clegg <tom@curoverse.com>
Thu, 14 Aug 2014 20:31:39 +0000 (16:31 -0400)
jenkins/run-tests.sh

index bee80028647cb7183d89cd8f765e3a45b9c570ec..f52b5855790aa2176784b1fba4e415db9093fdf9 100755 (executable)
@@ -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,17 @@ checkexit() {
     fi
 }
 
+gotest() {
+  title "Starting $1 tests"
+  cd "$WORKSPACE"
+
+  go get -t "git.curoverse.com/arvados.git/$1" \
+  && go test "git.curoverse.com/arvados.git/$1"
+
+  checkexit "$1 tests"
+  title "$1 tests complete"
+}
+
 checkexit "Doc build"
 title "DOC build complete"
 
@@ -98,53 +113,29 @@ 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"
-
-  go get -t "git.curoverse.com/arvados.git/$dir" \
-  && go test "git.curoverse.com/arvados.git/$dir"
-
-  checkexit "$dir tests"
-  title "$dir tests complete"
-done
-
-
-# WORKBENCH
-title "Starting workbench tests"
-cd "$WORKSPACE"
-cd apps/workbench
-bundle install --deployment
-
-echo $PATH
-
-
-bundle exec rake test
+# Keepstore. The keepstore binary is used by many other test suites,
+# so we test and install it early.
 
-checkexit "Workbench tests"
-title "Workbench tests complete"
+gotest services/keepstore
 
 # Python SDK
-title "Starting Python SDK tests"
+
 cd "$WORKSPACE"
 cd sdk/cli
 bundle install --deployment
 
 # Set up Python SDK and dependencies
 
+title "Starting Python SDK tests"
 cd "$WORKSPACE"
 cd sdk/python
 
-VENVDIR=$(mktemp -d)
-virtualenv --setuptools "$VENVDIR"
-"$VENVDIR/bin/python" setup.py test
+python setup.py test
 
 checkexit "Python SDK tests"
 
-"$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 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"
 
@@ -152,19 +143,38 @@ cd "$WORKSPACE"
 cd services/fuse
 
 # We reuse $VENVDIR from the Python SDK tests above
-"$VENVDIR/bin/python" setup.py test
+python setup.py test
 
 checkexit "FUSE tests"
 
-"$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
+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"
 
 title "Python SDK tests complete"
 
-# Clean up $VENVDIR
+for dir in services/keepproxy sdk/go/arvadosclient sdk/go/keepclient sdk/go/streamer
+do
+  gotest "$dir"
+end
+
+# WORKBENCH
+title "Starting workbench tests"
+cd "$WORKSPACE"
+cd apps/workbench
+bundle install --deployment
+
+echo $PATH
+
+bundle exec rake test
+
+checkexit "Workbench tests"
+title "Workbench tests complete"
+
+# 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