summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorAnel Husakovic <anel@mariadb.org>2022-12-05 11:13:21 +0100
committerAnel <an3l@users.noreply.github.com>2022-12-05 15:24:36 +0100
commita59dffb0e92704b308476e1e38651318a4c044b2 (patch)
tree53c030c6cb111849201e45a6d477f76e8332726c /mysql-test
parent180b2bcd5389082e200f65ebc13a9b81bcc3e882 (diff)
downloadmariadb-git-a59dffb0e92704b308476e1e38651318a4c044b2.tar.gz
dgcov: parsing without dot to get specific version
- Regression introduced 7baf24a0f8e9491a55 for multidigit gcc dump. There is no dot in `dumpversion`. ``` $ gcc -dumpversion 10 ``` Otherwise it will fail and not produce the output ``` Running dgcov Name "IO::Uncompress::Gunzip::GunzipError" used only once: possible typo at ./dgcov.pl line 197. Cannot parse gcc -dumpversion: 9 ``` - The warning `once` is always generated: ``` Running dgcov Name "IO::Uncompress::Gunzip::GunzipError" used only once: possible typo at ./dgcov.pl line 197. <number> ``` Suppresing the line `Name "IO::Uncompress::Gunzip::GunzipError" used only once: possible typo at ./dgcov.pl line 197.` with the patch. - Reviewed by: <>
Diffstat (limited to 'mysql-test')
-rwxr-xr-xmysql-test/dgcov.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/mysql-test/dgcov.pl b/mysql-test/dgcov.pl
index c05c4211caa..94fe48805d1 100755
--- a/mysql-test/dgcov.pl
+++ b/mysql-test/dgcov.pl
@@ -71,7 +71,7 @@ if ($opt_purge)
}
my $gcc_version= `gcc -dumpversion`;
-$gcc_version=~ s/^(\d+)\..*$/$1/ or die "Cannot parse gcc -dumpversion: $gcc_version";
+$gcc_version=~ s/^(\d+).*$/$1/ or die "Cannot parse gcc -dumpversion: $gcc_version";
find(\&gcov_one_file, $root);
find(\&write_coverage, $root) if $opt_generate;
@@ -191,6 +191,7 @@ sub gcov_one_file {
} else {
require IO::Uncompress::Gunzip;
require JSON::PP;
+ no warnings 'once';
my $gcov_file_json;
s/\.gcda$// if $gcc_version >= 11;
IO::Uncompress::Gunzip::gunzip("$_.gcov.json.gz", \$gcov_file_json)