summaryrefslogtreecommitdiff
path: root/mysql-test/dgcov.pl
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/dgcov.pl')
-rwxr-xr-xmysql-test/dgcov.pl10
1 files changed, 8 insertions, 2 deletions
diff --git a/mysql-test/dgcov.pl b/mysql-test/dgcov.pl
index fbc5540e697..f2bbdad4d20 100755
--- a/mysql-test/dgcov.pl
+++ b/mysql-test/dgcov.pl
@@ -161,8 +161,14 @@ sub gcov_one_file {
system($cmd)==0 or die "system($cmd): $? $!";
}
- # now, read the generated file
- open FH, '<', "$_.gcov" or die "open(<$_.gcov): $!";
+ (my $filename = $_)=~ s/\.[^.]+$//; # remove extension
+ my $gcov_file_path= $File::Find::dir."/$filename.gcov";
+ if (! -f $gcov_file_path)
+ {
+ return;
+ }
+ open FH, '<', "$gcov_file_path" or die "open(<$gcov_file_path): $!";
+
my $fname;
while (<FH>) {
chomp;