From 824aa5f9181a22a55224d6945886894029d04a3d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 25 Oct 2007 14:30:51 +0000 Subject: Michal Marek fixed the test script to be able to use valgrind even when the lib is built shared with libtool. --- tests/runtests.pl | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/runtests.pl b/tests/runtests.pl index 71a02c9f6..875d8baa6 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -1747,7 +1747,7 @@ sub singletest { } if($valgrind) { - $CMDLINE = "valgrind ".$valgrind_tool."--leak-check=yes --num-callers=16 ${valgrind_logfile}=log/valgrind$testnum $CMDLINE"; + $CMDLINE = "$valgrind ".$valgrind_tool."--leak-check=yes --num-callers=16 ${valgrind_logfile}=log/valgrind$testnum $CMDLINE"; } $CMDLINE .= "$cmdargs >>$STDOUT 2>>$STDERR"; @@ -2537,10 +2537,8 @@ if($valgrind) { open(C, "<$CURL"); my $l = ; if($l =~ /^\#\!/) { - # The first line starts with "#!" which implies a shell-script. - # This means libcurl is built shared and curl is a wrapper-script - # Disable valgrind in this setup - $valgrind=0; + # A shell script. This is typically when built with libtool, + $valgrind="../libtool --mode=execute $valgrind"; } close(C); -- cgit v1.2.3