Update Go tests to new layout, rename keepstore, add missing tests for keepproxy...
authorTom Clegg <tom@curoverse.com>
Thu, 14 Aug 2014 17:13:18 +0000 (13:13 -0400)
committerTom Clegg <tom@curoverse.com>
Thu, 14 Aug 2014 17:13:18 +0000 (13:13 -0400)
jenkins/run-tests.sh

index ad2851d2e8a7ad250c6852592f95ca2c0ad4b03d..aeb5eb1b1812843190cd3debb4e54e18035c766c 100755 (executable)
@@ -13,6 +13,10 @@ title () {
 source /etc/profile.d/rvm.sh
 echo $WORKSPACE
 
+export GOPATH="$HOME/gocode"
+mkdir -p "$GOPATH/src/git.curoverse.com"
+ln -sfn "$WORKSPACE" "$GOPATH/src/git.curoverse.com/arvados.git"
+
 # DOCS
 title "Starting DOC build"
 cd "$WORKSPACE"
@@ -103,20 +107,25 @@ fi
 
 title "API server tests complete"
 
-# Keep
-title "Starting Keep tests"
-cd "$WORKSPACE"
-cd services/keep/src/keep
-GOPATH=$HOME/gocode go test
+# 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"
 
-ECODE=$?
+  go get -t "git.curoverse.com/arvados.git/$dir" \
+  && go test "git.curoverse.com/arvados.git/$dir"
 
-if [[ "$ECODE" != "0" ]]; then
-  title "!!!!!! Keep TESTS FAILED !!!!!!"
-  EXITCODE=$(($EXITCODE + $ECODE))
-fi
+  ECODE=$?
+
+  if [[ "$ECODE" != "0" ]]; then
+    title "!!!!!! Keep TESTS FAILED !!!!!!"
+    EXITCODE=$(($EXITCODE + $ECODE))
+  fi
+
+  title "$dir tests complete"
+done
 
-title "Keep tests complete"
 
 # WORKBENCH
 title "Starting workbench tests"
@@ -151,7 +160,7 @@ cd sdk/python
 
 VENVDIR=$(mktemp -d)
 virtualenv --setuptools "$VENVDIR"
-GOPATH="$HOME/gocode" "$VENVDIR/bin/python" setup.py test
+"$VENVDIR/bin/python" setup.py test
 
 ECODE=$?
 
@@ -174,7 +183,7 @@ cd "$WORKSPACE"
 cd services/fuse
 
 # We reuse $VENVDIR from the Python SDK tests above
-GOPATH="$HOME/gocode" "$VENVDIR/bin/python" setup.py test
+"$VENVDIR/bin/python" setup.py test
 
 ECODE=$?