aboutsummaryrefslogtreecommitdiffstats
path: root/testing/do-tests
diff options
context:
space:
mode:
authorAndreas Steffen <andreas.steffen@strongswan.org>2015-06-29 12:43:20 +0200
committerAndreas Steffen <andreas.steffen@strongswan.org>2015-07-21 23:17:14 +0200
commit6b265c5e5c190917a292d5e83e723989b37cf50b (patch)
tree9c2a4ceda37c5179141dec3d0dea0153f61a00fb /testing/do-tests
parent3d9bfb607c4402d41b315558d0d64de296a5a228 (diff)
downloadstrongswan-6b265c5e5c190917a292d5e83e723989b37cf50b.tar.bz2
strongswan-6b265c5e5c190917a292d5e83e723989b37cf50b.tar.xz
tests: Introduced SWANCTL flag in test.conf
Diffstat (limited to 'testing/do-tests')
-rwxr-xr-xtesting/do-tests48
1 files changed, 25 insertions, 23 deletions
diff --git a/testing/do-tests b/testing/do-tests
index 35f13ec5b..4811aac8e 100755
--- a/testing/do-tests
+++ b/testing/do-tests
@@ -254,27 +254,6 @@ do
continue
fi
- if [ $SUBDIR = "ipv6" -o $name = "rw-psk-ipv6" ]
- then
- IPROUTE_CMD="ip -6 route list table $SOURCEIP_ROUTING_TABLE"
- IPROUTE_DSP=$IPROUTE_CMD
- IPTABLES_CMD="ip6tables -v -n -L"
- IPTABLES_DSP="ip6tables -L"
- else
- IPROUTE_CMD="ip route list table $SOURCEIP_ROUTING_TABLE"
- IPROUTE_DSP=$IPROUTE_CMD
- IPTABLES_CMD="iptables -v -n -L"
- IPTABLES_DSP="iptables -L"
- fi
-
- if [ $name = "net2net-ip4-in-ip6-ikev2" -o $name = "net2net-ip6-in-ip4-ikev2" ]
- then
- IPROUTE_CMD="ip route list table $SOURCEIP_ROUTING_TABLE; echo; ip -6 route list table $SOURCEIP_ROUTING_TABLE"
- IPROUTE_DSP="ip (-6) route list table $SOURCEIP_ROUTING_TABLE"
- IPTABLES_CMD="iptables -v -n -L ; echo ; ip6tables -v -n -L"
- IPTABLES_DSP="iptables -L ; ip6tables -L"
- fi
-
[ -f $DEFAULTTESTSDIR/${testname}/description.txt ] || die "!! File 'description.txt' is missing"
[ -f $DEFAULTTESTSDIR/${testname}/test.conf ] || die "!! File 'test.conf' is missing"
[ -f $DEFAULTTESTSDIR/${testname}/pretest.dat ] || die "!! File 'pretest.dat' is missing"
@@ -351,6 +330,8 @@ do
$DIR/scripts/load-testconfig $testname
unset RADIUSHOSTS
+ unset IPV6
+ unset SWANCTL
source $TESTDIR/test.conf
@@ -487,6 +468,27 @@ do
<img src="../../images/$DIAGRAM" alt="$VIRTHOSTS">
@EOF
+ if [ -n "$IPV6" -o $SUBDIR = "ipv6" ]
+ then
+ IPROUTE_CMD="ip -6 route list table $SOURCEIP_ROUTING_TABLE"
+ IPROUTE_DSP=$IPROUTE_CMD
+ IPTABLES_CMD="ip6tables -v -n -L"
+ IPTABLES_DSP="ip6tables -L"
+ else
+ IPROUTE_CMD="ip route list table $SOURCEIP_ROUTING_TABLE"
+ IPROUTE_DSP=$IPROUTE_CMD
+ IPTABLES_CMD="iptables -v -n -L"
+ IPTABLES_DSP="iptables -L"
+ fi
+
+ if [ $name = "net2net-ip4-in-ip6-ikev2" -o $name = "net2net-ip6-in-ip4-ikev2" ]
+ then
+ IPROUTE_CMD="ip route list table $SOURCEIP_ROUTING_TABLE; echo; ip -6 route list table $SOURCEIP_ROUTING_TABLE"
+ IPROUTE_DSP="ip (-6) route list table $SOURCEIP_ROUTING_TABLE"
+ IPTABLES_CMD="iptables -v -n -L ; echo ; ip6tables -v -n -L"
+ IPTABLES_DSP="iptables -L ; ip6tables -L"
+ fi
+
for host in $IPSECHOSTS
do
eval HOSTLOGIN=root@\$ipv4_${host}
@@ -494,7 +496,7 @@ do
scp $SSHCONF $HOSTLOGIN:/etc/strongswan.conf \
$TESTRESULTDIR/${host}.strongswan.conf > /dev/null 2>&1
- if [ $SUBDIR = "swanctl" ]
+ if [ -n "$SWANCTL" ]
then
scp $SSHCONF $HOSTLOGIN:/etc/swanctl/swanctl.conf \
$TESTRESULTDIR/${host}.swanctl.conf > /dev/null 2>&1
@@ -543,7 +545,7 @@ do
> $TESTRESULTDIR/${host}.iptables 2>/dev/null
chmod a+r $TESTRESULTDIR/*
- if [ $SUBDIR = "swanctl" ]
+ if [ -n "$SWANCTL" ]
then
cat >> $TESTRESULTDIR/index.html <<@EOF
<h3>$host</h3>