tests: fail and report when a parallel build fails (or times out)

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>
This commit is contained in:
Daniel Kahn Gillmor 2019-05-20 13:20:57 -04:00 committed by David Bremner
parent 73bf7e532e
commit c88e030580

View file

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