]> git.notmuchmail.org Git - notmuch/blobdiff - test/aggregate-results.sh
exit lingering gpg agents at the end of relevant tests
[notmuch] / test / aggregate-results.sh
index cc5b83fbaac9a3b6980341fd2e62d9cab24c98cb..6322854675fdae93cabbf55ac9a7cb531513b00d 100755 (executable)
@@ -1,4 +1,6 @@
-#!/bin/sh
+#!/usr/bin/env bash
+
+set -eu
 
 fixed=0
 success=0
@@ -49,7 +51,7 @@ pluralize () {
 }
 
 echo "Notmuch test suite complete."
-if [ "$fixed" = "0" ] && [ "$broken" = "0" ]; then
+if [ "$fixed" = "0" ] && [ "$failed" = "0" ]; then
     tests=$(pluralize "test" $total)
     printf "All $total $tests "
     if [ "$broken" = "0" ]; then
@@ -79,3 +81,13 @@ if [ "$skipped" != "0" ]; then
     tests=$(pluralize "test" $skipped)
     echo "$skipped $tests skipped."
 fi
+
+# Note that we currently do not consider skipped tests as failing the
+# build.
+
+if [ $success -gt 0 -a $fixed -eq 0 -a $failed -eq 0 ]
+then
+    exit 0
+else
+    exit 1
+fi