-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
As of 1.19 it is not possible to accurately measure unit test coverage #43410
Comments
|
C++ tools solve this by:
|
I guess we could try to add support for GCOV_ARC_FAKE in LLVM's gcov instrumentation. |
The tracking issue for -Zprofile is #42524. I think in the meantime, until this is fixed in LLVM, you can keep using -Zno-landing-pads as a workaround. |
See also #55352 which proposes some alternative solutions here. |
Note #43410 removes -Zno-landing-pads |
@ctz: that's this issue, I think you mean a PR. |
Derp. I meant #70175 |
Another workaround can be mozilla/grcov#427 (comment):
|
Alternatively, pinning the rust version to |
1.19 prevents access to
-Zno-landing-pads
. I was using that to get accurate test coverage; without it all landing pads appear as uncovered code at the start and end of every function.-Cpanic=abort
is intended to be the stable replacement for-Zno-landing-pads
but unfortunately that isn't supported for unit tests (apparently, because libtest requires unwinding support).I'd like a way to do any of the following on stable:
no-landing-pads
behaviour, or,panic=abort
work for unit tests. Note that I don't much care thatshould_panic
tests wouldn't work.Is there some combination of cargo/rustc options that might achieve that?
The text was updated successfully, but these errors were encountered: