X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=test%2Ftestlib.sh;h=31033352c4137d19c474755294c5826af807d6de;hp=635bafe332556700c96d4b1719719473064f41d4;hb=9a66d7499ae2c838c25f9c6bfcc277c3fa231dea;hpb=1cdb0c21d42d600d0e89857f4e9f33843f9372c8 diff --git a/test/testlib.sh b/test/testlib.sh index 635bafe3..31033352 100644 --- a/test/testlib.sh +++ b/test/testlib.sh @@ -5,6 +5,7 @@ tincd=../src/tincd tinc=../src/tinc sptps_test=../src/sptps_test +sptps_keypair=../src/sptps_keypair # Test directories @@ -21,10 +22,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" @@ -34,8 +31,18 @@ c3="--config=$d3 --pidfile=$d3/pid" # Arguments when running tincd r1="--logfile=$d1/log -d5" -r2="--logfile=$d1/log -d5" -r3="--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