summaryrefslogtreecommitdiff
path: root/tests/valgrind.pm
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2007-10-31 18:32:06 +0000
committerDan Fandrich <dan@coneharvesters.com>2007-10-31 18:32:06 +0000
commit6790c559afb1724607ae077fb3664efbef959557 (patch)
treef3e0fe493c91a1d076eb9d0ed8489e59e284f930 /tests/valgrind.pm
parentc56c4a0a47e19b3c881dcb23c0246e0daffbd0d4 (diff)
downloadcurl-6790c559afb1724607ae077fb3664efbef959557.tar.gz
Detect curl source when valgrind provides an absolute source file name
Diffstat (limited to 'tests/valgrind.pm')
-rw-r--r--tests/valgrind.pm10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/valgrind.pm b/tests/valgrind.pm
index e2ead03c8..82efe2f8a 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 {