-
-
Notifications
You must be signed in to change notification settings - Fork 109
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
Merging coverage of different tests using the same executable #54
Comments
That's actually something which should just work "out-of-the-box", and I also have regression tests for it in the test suite, which passes. What kind of application are you running (Python, Bash or a compiled program)? Does it work with a trivial test, such as a shell script which can be invoked with different parameters: #!/bin/bash
if [ $1 -eq 1 ] ; then
echo "first"
else
echo "second"
fi kcov-merge only outputs a summary, so individual sources are not present there. Something similar would be possible to add to kcov itself, but I haven't seen it as very important so far. |
Is this in a shared library by the way? In that case, it might be caused by the library being loaded at a different base address the next time. If this is the case, the bug is caused by kcov storing collected data with actual addresses (which are not meaningful for libraries). |
Yes, its in a shared library. I didn't check if it merges the actual exectuable coverage correctly, I was just looking at the library. |
OK. I didn't realize that this was a problem until now. I'll add a regression test and think of a solution. |
Makes it easier to extend with other information.
Makes it possible to accumulate data for shared libraries.
Fixed (but lightly tested!) via 96c6eeb. The implementation remembers the address ranges when shared libraries are added, and stores rangeIndex,offset pairs in the database. Closing, but feel free to reopen if it turns out to be buggy :-) |
Hi,
thanks again for fixing the shared library coverage. My current issue lies with the merging of coverage from multiple runs of the same executable.
If I run
then /tmp/kcov holds only the results of the last invocation of "app".
If I use different directories for each invocation and then use kcov-merge, I seem not to be able to look at individual source file coverage anymore.
Is there a way to aggregate coverage from multiple runs of the same executable (with different options?)
Best wishes,
Matthias
The text was updated successfully, but these errors were encountered: