From: Dan Fandrich Date: Wed, 31 Oct 2007 18:32:06 +0000 (+0000) Subject: Detect curl source when valgrind provides an absolute source file name X-Git-Tag: curl-7_18_0~322 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6790c559afb1724607ae077fb3664efbef959557;p=thirdparty%2Fcurl.git Detect curl source when valgrind provides an absolute source file name --- diff --git a/tests/valgrind.pm b/tests/valgrind.pm index e2ead03c8f..82efe2f8af 100644 --- a/tests/valgrind.pm +++ b/tests/valgrind.pm @@ -21,6 +21,8 @@ # $Id$ ########################################################################### +use File::Basename; + sub valgrindparse { my ($srcdir, # the dir in which the runtests script resides $sslenabled, @@ -44,13 +46,13 @@ sub valgrindparse { my $w = $4; if($w =~ /(.*) \(([^:]*):(\d+)/) { my ($func, $source, $line)=($1, $2, $3); - - if(-f "$srcdir/../src/$source" || - -f "$srcdir/../lib/$source") { + my $sourcename = basename($source); + if(-f "$srcdir/../src/$sourcename" || + -f "$srcdir/../lib/$sourcename") { # this is our source # print "$func() at $source:$line\n"; $us++; - } + } #else {print "Not our source: $func, $source, $line\n";} } } else {