aboutsummaryrefslogtreecommitdiffstats
path: root/tests/internals/test_rate_limiter_valgrind.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/internals/test_rate_limiter_valgrind.sh')
-rwxr-xr-xtests/internals/test_rate_limiter_valgrind.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/internals/test_rate_limiter_valgrind.sh b/tests/internals/test_rate_limiter_valgrind.sh
index bf0a7cd..5958492 100755
--- a/tests/internals/test_rate_limiter_valgrind.sh
+++ b/tests/internals/test_rate_limiter_valgrind.sh
@@ -1,5 +1,11 @@
-#!/bin/sh
+#!/bin/sh -eu
if [ ! -x ./test_rate_limiter ]; then
cd `dirname "$0"`
fi
-valgrind --error-exitcode=100 ./test_rate_limiter
+
+if [ -n "`which valgrind`" ]; then
+ valgrind --error-exitcode=100 ./test_rate_limiter
+else
+ echo "Warning: valgrind not found. Running without."
+ ./test_rate_limiter
+fi