diff options
Diffstat (limited to 'mysql-test')
-rwxr-xr-x | mysql-test/dgcov.pl | 10 | ||||
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 2 |
2 files changed, 9 insertions, 3 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; diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 178d65aca41..be51a79e0be 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -1791,7 +1791,7 @@ sub command_line_setup { # -------------------------------------------------------------------------- # Gcov flag # -------------------------------------------------------------------------- - if ( ($opt_gcov or $opt_gprof) and ! $source_dist ) + if ( ($opt_gcov or $opt_gprof) and (! $source_dist or -d $ENV{MTR_BINDIR})) { mtr_error("Coverage test needs the source - please use source dist"); } |