When run-tests.sh is invoked to only run the api server tests, do not
authorWard Vandewege <ward@curoverse.com>
Sat, 14 Feb 2015 19:21:14 +0000 (14:21 -0500)
committerWard Vandewege <ward@curoverse.com>
Sat, 14 Feb 2015 19:21:14 +0000 (14:21 -0500)
spin up an api server for all the tests that will not be run.

No issue #

jenkins/run-tests.sh

index 03928ce7af5eb67136c162a0081a76c3d0ff8b3d..a70606887f4b6c6215c3be123e758aaca8c30284 100755 (executable)
@@ -546,6 +546,13 @@ stop_api() {
         && python sdk/python/tests/run_test_server.py stop
 }
 
+clean_up() {
+  report_outcomes
+  clear_temp
+
+  exit ${#failures}
+}
+
 test_doclinkchecker() {
     (
         set -e
@@ -566,6 +573,14 @@ test_apiserver() {
 }
 do_test services/api apiserver
 
+# Shortcut for when we're only running apiserver tests. This saves a bit of time,
+# because we don't need to start up the api server for subsequent tests.
+if [ ! -z "$only" ] && [ "$only" == "services/api" ]; then
+  rotate_logfile "$WORKSPACE/services/api/log/" "test.log"
+
+  clean_up
+fi
+
 start_api
 
 test_ruby_sdk() {
@@ -612,9 +627,6 @@ do_test apps/workbench_profile workbench_profile
 rotate_logfile "$WORKSPACE/apps/workbench/log/" "test.log"
 
 stop_api
-rotate_logfile "$WORKSPACE/services/api/log/" "test.log"
 
-report_outcomes
-clear_temp
-
-exit ${#failures}
+rotate_logfile "$WORKSPACE/services/api/log/" "test.log"
+clean_up