Przeglądaj źródła

tests: ensure sponge-files are cleaned up properly

Git-Dch: Ignore
David Kalnischkies 10 lat temu
rodzic
commit
3685f84d8c
1 zmienionych plików z 2 dodań i 0 usunięć
  1. 2 0
      test/integration/run-tests

+ 2 - 0
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}: "