From 3c0d7b8bdcf66a2bfe4121dc16f3e8dd34916af9 Mon Sep 17 00:00:00 2001 From: Simon Butcher Date: Mon, 23 May 2016 11:13:17 +0100 Subject: [PATCH] Adds check for valgrind to ssl-opt.sh (#488) Provides graceful exit rather than fail silently if valgrind isn't installed. --- tests/ssl-opt.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/ssl-opt.sh b/tests/ssl-opt.sh index 0edb783f8..863524200 100755 --- a/tests/ssl-opt.sh +++ b/tests/ssl-opt.sh @@ -551,6 +551,12 @@ if [ ! -x "$P_PXY" ]; then echo "Command '$P_PXY' is not an executable file" exit 1 fi +if [ "$MEMCHECK" -gt 0 ]; then + if which valgrind >/dev/null 2>&1; then :; else + echo "Memcheck not possible. Valgrind not found" + exit 1 + fi +fi if which $OPENSSL_CMD >/dev/null 2>&1; then :; else echo "Command '$OPENSSL_CMD' not found" exit 1