]> git.meshlink.io Git - meshlink/blobdiff - test/testlib.sh
Fix tincd logfile location when running tests.
[meshlink] / test / testlib.sh
index e65127d6acf9bd3b20779ad9a30b98195aedcf50..d60b9da5b37e6f6cd4c08f99b6b5e02bf2e5f490 100644 (file)
@@ -8,9 +8,18 @@ sptps_test=../src/sptps_test
 
 # Test directories
 
-d1=$PWD/$_.1
-d2=$PWD/$_.2
-d3=$PWD/$_.3
+case "$_" in
+       /*)
+               d1=$_.1
+               d2=$_.2
+               d3=$_.3
+       ;;
+       *)
+               d1=$PWD/$_.1
+               d2=$PWD/$_.2
+               d3=$PWD/$_.3
+       ;;
+esac
 
 # Remove test directories
 
@@ -25,8 +34,8 @@ 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"
 
 # Exit on errors, log all commands being executed