]> git.saurik.com Git - apt.git/blobdiff - test/integration/run-tests
tests: ensure sponge-files are cleaned up properly
[apt.git] / test / integration / run-tests
index 87cc292d7a083f52ab8044ba37582b5f6bcf0b21..f2a2661397f0ca2cc70ca445933fe8d321cc3f57 100755 (executable)
@@ -47,6 +47,8 @@ fi
 if [ -n "$TESTTORUN" ]; then
        # collecting the output of one test to have it together
        OUTPUT="$(mktemp)"
+       CURRENTTRAP="rm -f \"$OUTPUT\"; $CURRENTTRAP"
+       trap "$CURRENTTRAP" 0 HUP INT QUIT ILL ABRT FPE SEGV PIPE TERM
        {
                if [ "$MSGLEVEL" -le 2 ]; then
                        printf "${CTEST}Testcase ${CHIGH}${TESTTORUN##*/}${CRESET}: "