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
fix test coverage #5579
fix test coverage #5579
Conversation
MartinNowak
commented
Jul 8, 2017
- use single tests as workaround for Issue 16397
- fix single tests (broken sed command)
- use single tests as workaround for Issue 16397 - fix single tests (broken sed command)
Thanks for your pull request, @MartinNowak! Bugzilla references
|
- was only privately imported anyhow
- merging is done with file locking by druntime
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, thanks a lot for looking into this, Martin!
Only running the single tests (against a libphobos2.a w/o -cov) means we're no longer gathering coverage that happens from executing unittests of other modules, e.g. std.net.curl might use std.conv. |
Btw in these modules it decreases the coverage: and in these it increases the coverage: (not a complete screenshot) I will have a look if coverSetMerge can help here to get the best from both worlds. |
That doesn't sound like the right approach. If the change increases coverage in some places but decreases it in others, isn't it essentially replacing one broken solution with another broken solution? |
Better ideas are welcome!
Yes. |
@rainers Perhaps you could help us out with this one? |
How on earth would only running the tests from a module when measuring its code coverage increase its code coverage? Does it have something to do with having fewer template instantiations? Regardless, it makes seem like there's a problem with the coverage analyzer. |
I'm not sure I can. I think Martin's assessment in https://issues.dlang.org/show_bug.cgi?id=16397#c1 sounds correct. I don't have a solution to that. Always generating coverage instrumentation of templated code will only work if you cover all linked libraries, though. For example, coverage from druntime modules might leak into the report, just as well as that it might provide template instances without coverage instrumention. |
@wilzbach, @CyberShadow, @jmdavis, @rainers |
The decrease makes sense to me (e.g. the tests for |
Read the explanation in the bug report https://issues.dlang.org/show_bug.cgi?id=16397#c1, the linker picked non-instrumented template instantiations in various places. |
Ah, okay. That makes sense. LOL. Some of this stuff is just way more complicated than it seems like it should be. |
Sorry Martin, you're right, I only skimmed over the explanations. At the moment I was a bit overwhelmed and didn't grok it. I guess then we have
|