Open YuanLanier opened 1 year ago
One thin which might perhaps affect this is if you've built a "PIE executable", which is effectively loaded as a shared library. If you're able to recompile your application, you may try to add the -no-pie
argument to the CFLAGS/CXXFLAGS and the LDFLAGS.
Sorry for the late reply!
I've tried this again, and can't seem to reproduce it here. I put your example in /tmp/a.cc, compiled to /tmp/a and ran
src/kcov --collect-only /tmp/kcov /tmp/a
src/kcov --report-only /tmp/kcov/ /tmp/a
and I get the same results with collect+report as without them. Ran the test on master, but I don't think anything has changed for a while which should be related to collect+report.
Hi Simon,
We are experimenting kcov v41 with running --collect-only/--report-only separately for a .cc binary. But the coverage report ended being empty. Please advise whether we missed anything. Below are the details.
Here is a small .cc test example.
We built the binary using :
Then we used the below commands to generate the reports.
The generated report is empty.
But if we create the report in one step, the coverage report is as expected.
We notice in the case of running --collect-only/--report-only separately, the coverage.db size is much smaller and the html/js files associated with the source files are also missing. Here is the comparison.
The previously reported issue https://github.com/SimonKagstrom/kcov/issues/330 seems to be similar to this issue we are experiencing although our case is the compiled language case.
Could you please advise how to get the compiled language coverage report case working when using --collect-only/--report-only separately? Thank you!