chiark / gitweb /
test suite: Honour new DGIT_TEST_KEEP_MUSTCLEAN
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 8 Aug 2019 10:38:58 +0000 (11:38 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 10 Aug 2019 23:09:28 +0000 (00:09 +0100)
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>
tests/lib

index 6f36130007d3aa2450f754b89202e6f41b4c1bc6..c788744b543ced2daccbb407ab0cd44ebd47477e 100644 (file)
--- a/tests/lib
+++ b/tests/lib
@@ -25,6 +25,7 @@ END
 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