]> git.saurik.com Git - apt.git/commitdiff
tests: ensure sponge-files are cleaned up properly
authorDavid Kalnischkies <david@kalnischkies.de>
Sun, 11 Oct 2015 11:00:56 +0000 (13:00 +0200)
committerDavid Kalnischkies <david@kalnischkies.de>
Wed, 4 Nov 2015 17:04:00 +0000 (18:04 +0100)
Git-Dch: Ignore

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}: "