diff --git a/mysql-test/lib/mtr_gcov.pl b/mysql-test/lib/mtr_gcov.pl index ef1067bfd27..2f211b7566d 100644 --- a/mysql-test/lib/mtr_gcov.pl +++ b/mysql-test/lib/mtr_gcov.pl @@ -64,7 +64,8 @@ sub gcov_collect ($$$) { $dir_reported= 1; } system("$gcov $f 2>>$start_dir/$gcov_err >>$start_dir/$gcov_msg"); - system("perl $basedir/mysql-test/lib/process-purecov-annotations.pl $f.gcov"); + system("perl", "$basedir/mysql-test/lib/process-purecov-annotations.pl", "$f.gcov"); + } chdir($start_dir); } diff --git a/mysql-test/lib/process-purecov-annotations.pl b/mysql-test/lib/process-purecov-annotations.pl index 843d1d2f130..d533bd02fd6 100755 --- a/mysql-test/lib/process-purecov-annotations.pl +++ b/mysql-test/lib/process-purecov-annotations.pl @@ -47,7 +47,7 @@ foreach my $in_file_name ( @ARGV ) # my @arr= split(/:/, $line); if ($skipping || $line =~ /purecov: *(inspected|deadcode)/ || - $arr[2] =~ m/^{ */) + $arr[2] =~ m/^{ *$/) { # Change '####' to '-'. $arr[0] =~ s/#####/ -/g; @@ -57,8 +57,7 @@ foreach my $in_file_name ( @ARGV ) } close(IN); close(OUT); - system("cat $out_file_name > $in_file_name"); - system("rm $out_file_name"); + system("mv", "-f", $out_file_name, $in_file_name); }