[PATCH 2/2] tests: fail and report when a parallel build fails (or times out)

Daniel Kahn Gillmor dkg at fifthhorseman.net
Mon May 20 10:20:57 PDT 2019


When a parallel build fails (or when it times out, if timeout is
present), the test suite should not blithely succeed.  Catch these
failures and at least report them.

Signed-off-by: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
---
 test/notmuch-test | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/test/notmuch-test b/test/notmuch-test
index dbca39ca..bbc2dc31 100755
--- a/test/notmuch-test
+++ b/test/notmuch-test
@@ -49,6 +49,11 @@ if test -z "$NOTMUCH_TEST_SERIALIZE" && command -v parallel >/dev/null ; then
         echo "INFO: running tests with moreutils parallel"
         $TEST_TIMEOUT_CMD parallel -- $TESTS
     fi
+    RES=$?
+    if [[ $RES != 0 ]]; then
+        echo "parallel test suite returned error code $RES"
+        exit $RES
+    fi
 else
     for test in $TESTS; do
         $TEST_TIMEOUT_CMD $test "$@" &
-- 
2.20.1



More information about the notmuch mailing list