From 32ea50d336db8ca7d9501e178b3f9abe547841f2 Mon Sep 17 00:00:00 2001 From: Stephen Dolan Date: Fri, 13 Dec 2013 01:07:26 +0000 Subject: [PATCH] Make the testsuite run on machines without valgrind --- tests/run | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/run b/tests/run index a4b5b320..ff09246c 100755 --- a/tests/run +++ b/tests/run @@ -1,3 +1,9 @@ #!/bin/sh -cat $@ | valgrind --error-exitcode=1 -q --leak-check=full ./jq --run-tests \ No newline at end of file +if which valgrind > /dev/null; then + VALGRIND='valgrind --error-exitcode=1 -q --leak-check=full' +else + VALGRIND= +fi + +cat $@ | $VALGRIND ./jq --run-tests