From: David Kalnischkies Date: Sun, 11 Oct 2015 11:00:56 +0000 (+0200) Subject: tests: ensure sponge-files are cleaned up properly X-Git-Tag: 1.1_exp15~40 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/3685f84d8c0abfbddd12e034561e5f3fe8cbf2eb tests: ensure sponge-files are cleaned up properly Git-Dch: Ignore --- diff --git a/test/integration/run-tests b/test/integration/run-tests index 87cc292d7..f2a266139 100755 --- a/test/integration/run-tests +++ b/test/integration/run-tests @@ -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}: "