Add test for import, export and exchange commands.
[tinc] / test / testlib.sh
1 #!/bin/sh
2
3 # Paths to executables
4
5 tincd=../src/tincd
6 tinc=../src/tinc
7 sptps_test=../src/sptps_test
8
9 # Test directories
10
11 case "$_" in
12         /*)
13                 d1=$_.1
14                 d2=$_.2
15                 d3=$_.3
16         ;;
17         *)
18                 d1=$PWD/$_.1
19                 d2=$PWD/$_.2
20                 d3=$PWD/$_.3
21         ;;
22 esac
23
24 # Remove test directories
25
26 rm -rf $d1 $d2 $d3
27
28 # Default arguments for both tinc and tincd
29
30 c1="--config=$d1 --pidfile=$d1/pid"
31 c2="--config=$d2 --pidfile=$d2/pid"
32 c3="--config=$d3 --pidfile=$d3/pid"
33
34 # Arguments when running tincd
35
36 r1="--logfile=$d1/log -d5"
37 r2="--logfile=$d1/log -d5"
38 r3="--logfile=$d1/log -d5"
39
40 # Exit on errors, log all commands being executed
41
42 set -ex