summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGert Doering <gert@greenie.muc.de>2012-06-07 17:35:53 +0200
committerDavid Sommerseth <davids@redhat.com>2012-06-13 10:56:14 +0200
commit64a6bdf73cd624939a8f597fc5330b946f6bf1f1 (patch)
treec806774e8a7efea6fc1897f479df0d5734973998 /tests
parent8e1975b046dcf821eaf03098677dc5e34cd3a1a5 (diff)
downloadopenvpn-64a6bdf73cd624939a8f597fc5330b946f6bf1f1.tar.gz
openvpn-64a6bdf73cd624939a8f597fc5330b946f6bf1f1.tar.xz
openvpn-64a6bdf73cd624939a8f597fc5330b946f6bf1f1.zip
t_client.sh - fix for iproute2, print summary line
Yet another postprocess-output fix for iproute2 (sometimes there was no whitespace in the output, so substituting away expiry time failed). Print summary line of succeeded and failed test sets at the very end. Signed-off-by: Gert Doering <gert@greenie.muc.de> Acked-by: David Sommerseth <davids@redhat.com> Message-Id: 20120607174255.GV1059@greenie.muc.de URL: http://article.gmane.org/gmane.network.openvpn.devel/6704 Signed-off-by: David Sommerseth <davids@redhat.com>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/t_client.sh.in12
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/t_client.sh.in b/tests/t_client.sh.in
index d58b821..8c66033 100755
--- a/tests/t_client.sh.in
+++ b/tests/t_client.sh.in
@@ -91,7 +91,7 @@ get_ifconfig_route()
echo "-- linux iproute2 --"
@IPROUTE@ addr show | grep -v valid_lft
@IPROUTE@ route show
- @IPROUTE@ -o -6 route show | grep -v ' cache' | sed -e 's/expires [0-9]*sec //'
+ @IPROUTE@ -o -6 route show | grep -v ' cache' | sed -e 's/expires [0-9]*sec//'
return
fi
@@ -203,6 +203,9 @@ run_ping_tests()
# ----------------------------------------------------------
# main test loop
# ----------------------------------------------------------
+SUMMARY_OK=
+SUMMARY_FAIL=
+
for SUF in $TEST_RUN_LIST
do
# get config variables
@@ -294,12 +297,19 @@ do
fi
if [ "$fail_count" = 0 ] ; then
echo -e "test run $SUF: all tests OK.\n"
+ SUMMARY_OK="$SUMMARY_OK $SUF"
else
echo -e "test run $SUF: $fail_count test failures. FAIL.\n";
+ SUMMARY_FAIL="$SUMMARY_FAIL $SUF"
exit_code=30
fi
done
+if [ -z "$SUMMARY_OK" ] ; then SUMMARY_OK=" none"; fi
+if [ -z "$SUMMARY_FAIL" ] ; then SUMMARY_FAIL=" none"; fi
+echo "Test sets succeded:$SUMMARY_OK."
+echo "Test sets failed:$SUMMARY_FAIL."
+
# remove trap handler
trap - 0 1 2 3 15
exit $exit_code