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