aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2003-10-31 21:34:39 +0000
committerDaniel Stenberg <daniel@haxx.se>2003-10-31 21:34:39 +0000
commitdecdb93ccbbcce84a225aa4fc080187726304acc (patch)
treeaae76e99b90b6d62810e01049009e3523380f9f9 /tests
parent3e24c6a957f8141d7ccd43a0b10f82d79d3a5827 (diff)
my own system had a bad valgrind, so check that it works at least somewhat
before we use it
Diffstat (limited to 'tests')
-rwxr-xr-xtests/runtests.pl12
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/runtests.pl b/tests/runtests.pl
index ffb713b57..bca7d8d65 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