3894: Move report_outcomes to a function.
authorTom Clegg <tom@curoverse.com>
Mon, 22 Sep 2014 15:04:08 +0000 (11:04 -0400)
committerTom Clegg <tom@curoverse.com>
Mon, 22 Sep 2014 15:04:08 +0000 (11:04 -0400)
jenkins/run-tests.sh

index 680ae0a5fb7aff981fac56dee6c01514fe72e862..1db385792effb36d9212a1ec537d04914850a110 100755 (executable)
@@ -95,6 +95,23 @@ fatal() {
     exit 1
 }
 
+report_outcomes() {
+    for x in "${successes[@]}"
+    do
+        echo "Pass: $x"
+    done
+
+    if [[ ${#failures[@]} == 0 ]]
+    then
+        echo "All test suites passed."
+    else
+        echo "Failures (${#failures[@]}):"
+        for x in "${failures[@]}"
+        do
+            echo "Fail: $x"
+        done
+    fi
+}
 declare -a failures
 declare -A skip
 
@@ -395,21 +412,7 @@ test_workbench() {
 }
 do_test workbench
 
+report_outcomes
 clear_temp
 
-for x in "${successes[@]}"
-do
-    echo "Pass: $x"
-done
-
-if [[ ${#failures[@]} == 0 ]]
-then
-    echo "All test suites passed."
-else
-    echo "Failures (${#failures[@]}):"
-    for x in "${failures[@]}"
-    do
-        echo "Fail: $x"
-    done
-fi
 exit ${#failures}