r3592: auto-cleanup the test.$$ log files in these test scripts on control-C
authorAndrew Tridgell <tridge@samba.org>
Sun, 7 Nov 2004 10:02:27 +0000 (10:02 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:05:36 +0000 (13:05 -0500)
(This used to be commit a07bca1707857a33d50172432336b90e3da8c854)

source4/script/tests/test_echo.sh
source4/script/tests/test_posix.sh
source4/script/tests/test_rpc.sh

index 8065483f9a061c63a40bfaafb12b642d32984326..b778e4216ad682d0d4657421a59d521b05e9eee4 100755 (executable)
@@ -14,6 +14,7 @@ domain="$4"
 shift 4
 
 testit() {
+   trap "rm -f test.$$" EXIT
    cmdline="$*"
    if ! $cmdline > test.$$ 2>&1; then
        cat test.$$;
index 2448408ce5925dfb53f252862da1d6b5cafd3be0..92ed4fe52aa885967a90c3a8c2d61d35ea613841 100755 (executable)
@@ -17,6 +17,8 @@ start="$4"
 shift 3
 
 testit() {
+   trap "rm -f test.$$" EXIT
+
    cmdline="$*"
    if ! $cmdline > test.$$ 2>&1; then
        cat test.$$;
index 1b466e5f117c3c7a6f08d4769e50c090ec2c59c1..bfce65bbb606746d6aef19470e34d69daa898d17 100755 (executable)
@@ -18,6 +18,7 @@ domain="$4"
 shift 4
 
 testit() {
+   trap "rm -f test.$$" EXIT
    cmdline="$*"
    if ! $cmdline > test.$$ 2>&1; then
        cat test.$$;