From: Daniel Stenberg Date: Fri, 31 Oct 2003 21:34:39 +0000 (+0000) Subject: my own system had a bad valgrind, so check that it works at least somewhat X-Git-Tag: curl-7_10_8~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=decdb93ccbbcce84a225aa4fc080187726304acc;p=thirdparty%2Fcurl.git my own system had a bad valgrind, so check that it works at least somewhat before we use it --- diff --git a/tests/runtests.pl b/tests/runtests.pl index ffb713b579..bca7d8d65c 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -68,8 +68,16 @@ my @teststat; # teststat[testnum]=reason, reasons for skip if($valgrind) { # we have found valgrind on the host, use it - # perhaps we should verify that valgrind works before we actually use it? - $CURL="valgrind --leak-check=yes --logfile-fd=3 -q $CURL"; + # verify that we can invoke it fine + my $code = system("valgrind >/dev/null 2>&1"); + + if(($code>>8) != 1) { + #print "Valgrind failure, disable it\n"; + undef $valgrind; + } + else { + $CURL="valgrind --leak-check=yes --logfile-fd=3 -q $CURL"; + } } ####################################################################### # variables the command line options may set