From: David Sommerseth <dav...@redhat.com>

Check if fping and fping6 is available before running the real tests,
to avoid misleading test failures.

Signed-off-by: David Sommerseth <dav...@redhat.com>
---
 tests/t_client.sh.in | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/tests/t_client.sh.in b/tests/t_client.sh.in
index 189eecc..69278ee 100755
--- a/tests/t_client.sh.in
+++ b/tests/t_client.sh.in
@@ -24,6 +24,18 @@ else
     exit 77
 fi

+# Check for external dependencies
+which fping > /dev/null
+if [ $? -ne 0 ]; then
+    echo "$0: fping is not available in \$PATH"
+    exit 77
+fi
+which fping6 > /dev/null
+if [ $? -ne 0 ]; then
+    echo "$0: fping6 is not available \$PATH"
+    exit 77
+fi
+
 if [ ! -x "${top_builddir}/src/openvpn/openvpn" ]
 then
     echo "no (executable) openvpn binary in current build tree. FAIL." >&2
-- 
1.8.3.1


Reply via email to