From: Guus Sliepen Date: Sun, 1 Sep 2013 20:58:45 +0000 (+0200) Subject: Clean up leftover tincd and sptps_test processes. X-Git-Tag: release-1.1pre9~13 X-Git-Url: https://git.tinc-vpn.org/git/browse?a=commitdiff_plain;h=4e7e4818b771af47a10ce0b8f4046ab455ef14a9;p=tinc Clean up leftover tincd and sptps_test processes. --- diff --git a/test/Makefile.am b/test/Makefile.am index 4cb5f3f0..15db24fa 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -7,4 +7,6 @@ TESTS = \ EXTRA_DIST = testlib.sh clean-local: + -for pid in *.test.?/pid; do ../src/tinc --pidfile="$$pid" stop; done + -killall ../src/sptps_test -rm -rf *.test.? diff --git a/test/testlib.sh b/test/testlib.sh index d60b9da5..39a2bf4e 100644 --- a/test/testlib.sh +++ b/test/testlib.sh @@ -21,10 +21,6 @@ case "$_" in ;; esac -# Remove test directories - -rm -rf $d1 $d2 $d3 - # Default arguments for both tinc and tincd c1="--config=$d1 --pidfile=$d1/pid" @@ -37,6 +33,16 @@ r1="--logfile=$d1/log -d5" r2="--logfile=$d2/log -d5" r3="--logfile=$d3/log -d5" +# Check for leftover tinc daemons + +[ -f $d1/pid ] && $tinc $c1 stop +[ -f $d2/pid ] && $tinc $c2 stop +[ -f $d3/pid ] && $tinc $c3 stop + +# Remove test directories + +rm -rf $d1 $d2 $d3 + # Exit on errors, log all commands being executed set -ex