]> granicus.if.org Git - jq/commitdiff
Make the testsuite run on machines without valgrind
authorStephen Dolan <mu@netsoc.tcd.ie>
Fri, 13 Dec 2013 01:07:26 +0000 (01:07 +0000)
committerStephen Dolan <mu@netsoc.tcd.ie>
Fri, 13 Dec 2013 15:22:17 +0000 (15:22 +0000)
tests/run

index a4b5b320ca200719b8d5bbfe009940378926fb41..ff09246ce1d750e86ead8a3622191e62055cfa5f 100755 (executable)
--- 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