소스 검색

tests: ensure sponge-files are cleaned up properly

Git-Dch: Ignore
David Kalnischkies 10 년 전
부모
커밋
3685f84d8c
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  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}: "