From 51353ac5595c916171bbc23481ad7023037faf27 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 7 Nov 2004 10:02:27 +0000 Subject: r3592: auto-cleanup the test.$$ log files in these test scripts on control-C (This used to be commit a07bca1707857a33d50172432336b90e3da8c854) --- source4/script/tests/test_echo.sh | 1 + source4/script/tests/test_posix.sh | 2 ++ source4/script/tests/test_rpc.sh | 1 + 3 files changed, 4 insertions(+) diff --git a/source4/script/tests/test_echo.sh b/source4/script/tests/test_echo.sh index 8065483f9a..b778e4216a 100755 --- a/source4/script/tests/test_echo.sh +++ b/source4/script/tests/test_echo.sh @@ -14,6 +14,7 @@ domain="$4" shift 4 testit() { + trap "rm -f test.$$" EXIT cmdline="$*" if ! $cmdline > test.$$ 2>&1; then cat test.$$; diff --git a/source4/script/tests/test_posix.sh b/source4/script/tests/test_posix.sh index 2448408ce5..92ed4fe52a 100755 --- a/source4/script/tests/test_posix.sh +++ b/source4/script/tests/test_posix.sh @@ -17,6 +17,8 @@ start="$4" shift 3 testit() { + trap "rm -f test.$$" EXIT + cmdline="$*" if ! $cmdline > test.$$ 2>&1; then cat test.$$; diff --git a/source4/script/tests/test_rpc.sh b/source4/script/tests/test_rpc.sh index 1b466e5f11..bfce65bbb6 100755 --- a/source4/script/tests/test_rpc.sh +++ b/source4/script/tests/test_rpc.sh @@ -18,6 +18,7 @@ domain="$4" shift 4 testit() { + trap "rm -f test.$$" EXIT cmdline="$*" if ! $cmdline > test.$$ 2>&1; then cat test.$$; -- cgit