You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
#include <iostream>
using namespace std;
int main() {
int first_number, second_number, sum;
cout << "Enter two integers: ";
cin >> first_number >> second_number;
// sum of two numbers in stored in variable sumOfTwoNumbers
sum = first_number + second_number;
// prints sum
cout << first_number << " + " << second_number << " = " << sum;
return 0;
}
We built the binary using :
g++ cplusplus_demo.cc -g -o demo
Then we used the below commands to generate the reports.
But if we create the report in one step, the coverage report is as expected.
kcov output-collect-simply ./demo
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 case with --collect-only/--report-only:
The case without --collect-only/--report-only (collect and report in one step):
The previously reported issue #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!
The text was updated successfully, but these errors were encountered:
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.
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 #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!
The text was updated successfully, but these errors were encountered: