FTR, using this typically results in runes like
DGIT_TEST_KEEP_MUSTCLEAN=y tests/using-intree tests/tests/ftpmasterapi-http 2>&1 | tee tests/tmp/log
hanging instead of exiting, because the http server is still running
and its stderr is still going to tee.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
trap '
rc=$?
set +e
+ [ "x$DGIT_TEST_KEEP_MUSTCLEAN" != x ] || \
[ "x$DGIT_TEST_TMP" = x ] || rm -rf $DGIT_TEST_TMP/must-clean
set -e
test $rc = 0 || t-report-failure