Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
This is my simple program to test coverage
compile & run
gcovr with keep option is not working. i could not find example.cpp.gcov file in my source folder
It looks like gcovr will delete .gcov file. also it seems it writes it to /var folder
Thank you for the excellent bug report! This is a known issue for gcovr 4.x and is a duplicate of #285.
TL;DR: when we implemented parallelization, gcovr started copying the .gcov files to a tempdir so that the next run of
But it turns out that the original behaviour was broken all along! When a header file is included into multiple translation units, gcov will write a .gcov file for that header each time it processes the coverage data of the translation unit. The last one wins, so coverage data in headers will likely be incomplete in any files that are kept.
There are a couple of alternatives how this could be fixed, I'm not sure yet:
Let me know if you have any thoughts on what approach would be best, or if you'd like to implement a fix. Unfortunately, I won't be able to do any meaningful work on gcovr before ~January.