dgcov.pl was putting gcov execution counters on wrong lines
in the report (*.dgcov files were correct), because it was
incrementing the new line number for diff lines starting from '-'
(lines from the old file, not present in the new)
- Regression introduced 7baf24a0f8 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: <>
* update README
* fix version regex to support versions with two digits
* die if the version cannot be parsed
* support gcc versions 11+
* require JSON::PP not use, to avoid introducing new rpm dependency
into MariaDB-test
- Script covers situation for gcov (gcc) < 9 with non-json format of
generated files as well as for gcov (gcc) >=8 with json generated format
Reviewed by: serg@mariadb.com
When building with `make` gcov files use full path names,
when building with `ninja` gcov files use paths relative to the source root
in gcov_one_file() the current directory is somewhere under CMakeFiles/,
so if a file exists in the specified location, this location
must've been a full path name.
For every file.gcda file, gcov <7.x created file.cc.gcda.gcov.
While gcov 7.x and 8.x create file.cc.gcov
And sometimes otherfile.h.gcov or otherfile.ic.gcov, for included files.
(gcov 9.x+ creates .json.gz files, see MDEV-26102)
So, we use `gcov -l` that will create file.cc.gcda##file.cc.gcov,
file.cc.gcda##otherfile.h.gcov, etc. And we search and parse all
those file.cc.gcda*.gcov files.