-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot generate report from Meson's out-of-tree build with GCC's coverage instrumentation #1182
Comments
If --source-dir is set to |
Nope, it's completely empty, like in the first screenshot. |
I am starting to think it's an issue with the HTML renderer and not the input handling. Here's Cobertura output from the following command:
|
I thought I'd try to work around this by using gcovr to generate lcov data, and consume that with grcov:
I still have the missing paths, but now I also have extremely suspicious line hit counts: |
I've been trying to use grcov on a C project that uses Meson as a build system and GCC to compile. Meson does out-of-tree builds where binary artifacts are put in a separate build directory eg.
build
, possibly within the source tree. GCC seems to generategcno
files with a leading../
. I cannot figure out how to tell grcov how to handle this.Here is an example project, with an example CI job. Note the warnings:
I have tried many combinations of the main path argument,
--binary-path
,--source-dir
,--prefix-dir
, changing the current directory tobuild
, using absolute paths wherever possible, etc. At best, I can get coverage for thetest_main.c
file, but never forone/src/one.c
.The example HTML output looks like this:
Frustratingly, the cobertura output sometimes contains perfectly valid paths. They are just not present in the HTML output.
It is possible to generate a proper coverage HTML report with gcovr using the following command:
...so it is possible to use the coverage information generated by Meson and GCC there:
Version information:
The text was updated successfully, but these errors were encountered: