diff options
author | Sergei Golubchik <serg@mariadb.org> | 2022-12-04 00:31:29 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2022-12-04 00:31:29 +0100 |
commit | 180b2bcd5389082e200f65ebc13a9b81bcc3e882 (patch) | |
tree | 2d6735a983173d6ece2e230d02019ba407a7ff6b | |
parent | 7baf24a0f8e9491a55e47734d5242821a360f1bc (diff) | |
download | mariadb-git-180b2bcd5389082e200f65ebc13a9b81bcc3e882.tar.gz |
dgcov: also remove rpm dependency on IO::Uncompress::Gunzip
and enable option bundling
-rwxr-xr-x | mysql-test/dgcov.pl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mysql-test/dgcov.pl b/mysql-test/dgcov.pl index 4adafd552fa..c05c4211caa 100755 --- a/mysql-test/dgcov.pl +++ b/mysql-test/dgcov.pl @@ -36,6 +36,7 @@ my $opt_skip_gcov; my %cov; my $file_no=0; +Getopt::Long::Configure ("bundling"); GetOptions ("v|verbose+" => \$opt_verbose, "h|help" => \$opt_help, @@ -188,17 +189,16 @@ sub gcov_one_file { close(FH); } } else { - use IO::Uncompress::Gunzip qw(gunzip $GunzipError); + require IO::Uncompress::Gunzip; require JSON::PP; my $gcov_file_json; - my $fname; s/\.gcda$// if $gcc_version >= 11; - gunzip "$_.gcov.json.gz" => \$gcov_file_json or die "gunzip($_.gcov.json.gz): $GunzipError"; + IO::Uncompress::Gunzip::gunzip("$_.gcov.json.gz", \$gcov_file_json) + or die "gunzip($_.gcov.json.gz): $IO::Uncompress::Gunzip::GunzipError"; my $obj= JSON::PP::decode_json $gcov_file_json; for my $file (@{$obj->{files}}) { - $fname= $file->{file}; for my $line (@{$file->{lines}}){ - $cov{$fname}->{$line->{line_number}}+= $line->{count}; + $cov{$file->{file}}->{$line->{line_number}}+= $line->{count}; } } } |