]> git.cworth.org Git - notmuch/commitdiff
tests: fail and report when a parallel build fails (or times out)
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Mon, 20 May 2019 17:20:57 +0000 (13:20 -0400)
committerDavid Bremner <david@tethera.net>
Mon, 20 May 2019 17:48:56 +0000 (14:48 -0300)
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@fifthhorseman.net>
test/notmuch-test

index dbca39ca935633feb0a7af28a0dae03384046939..bbc2dc31b30d1c39b76c622bd6f93cbc5c69cc40 100755 (executable)
@@ -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 "$@" &