-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Make CC_CODE_COVERAGE_SCRIPT failures fail tests #15420
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
base: master
Are you sure you want to change the base?
Make CC_CODE_COVERAGE_SCRIPT failures fail tests #15420
Conversation
there are CI failures |
Hi there! Thank you for contributing to the Bazel repository. We appreciate your time and effort. We're doing a clean up of old PRs and will be closing this one since it seems to have stalled. Please feel free to reopen/let us know if you’re still interested in pursuing this or if you'd like to discuss anything further. We’ll respond as soon as we have the bandwidth/resources to do so. |
@keertk can you reopen please |
575b63f
to
9a0b847
Compare
Closing as another 2 months passed by. Feel free to reopen. |
we should really do this but fixing the existing tests is definitely annoying |
9a0b847
to
8313587
Compare
reopening with a opt-in env var to continue ignoring this failure meant only to avoid all the issues with bazel tests + CI setup (users should avoid this flag) |
@comius what do you think about this solution to avoid having to fix all the tests + CI runner setup |
@comius can you take a look? |
ab3967d
to
3dad2a9
Compare
fc7a9cc
to
fbec90f
Compare
@pzembrod can you checkout this one too? 🙏🏻 |
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.
Will double-check with @c-mita tomorrow.
How many tests fail without the flag set? I wouldn't think it's many? |
last I checked it was many and i only added the opt outs as needed, i will test again. |
The core issue is the CI machines don't have the tools installed |
Ok, so before this can be accepted, I think one of two things needs to be changed:
The former is more complex but is I think the better solution. And we should get around to resolving the coverage linking issue (#15634 (comment)), although I don't think that's a hard requirement for this. |
I agree that this is the best approach, but I'm not sure how to determine whether this is the case. For example, what about a java_binary that has a JNI |
I'm not a fan of it, but We could just add another environment variable saying "hey, C++ coverage is needed now"? |
Checking for the variables sounds good to me |
isn't this virtually already done by the fact that |
This attribute isn't specific to |
fbec90f
to
5dd7e60
Compare
should, will, or does? since right now it really is only cc_test AFAICT. I don't think the gcov one is entirely safe since there are codepaths that shouldn't need that tool today, but it looks like |
Should and sometimes does, see https://github.com/bazel-contrib/rules_go/blob/1172e60b3fdb3c1b1f6efc781eda9819533375ac/go/private/rules/test.bzl#L466 and https://github.com/bazel-contrib/rules_python/blob/175a33610e853388c83730d9e2b5b2ac3626649d/python/private/attributes.bzl#L391. https://bazel.build/extending/rules#test_rules documents this. That variable is a good fit as well, it's unconditionally set to some value in the built-in Starlark logic. |
396177d
to
cdbc8dd
Compare
If you're editing, or overriding, this script and you introduce and introduce an error, previously this wouldn't fail the test invocation.
cdbc8dd
to
a3d8e08
Compare
green now, still had to disable in 1 place where it fails on macOS CI |
@c-mita I think this is ready for another pass 🙏🏻 |
If you're editing, or overriding, this script and you introduce and
introduce an error, previously this wouldn't fail the test invocation.
Fixes #18650
Fixes #26541