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
{{ message }}
Repository navigation
_collect_cc_coverage script can silently fail to produce coverage #18650
The script would fail with a File not found error and no coverage would be reported.
This to me seems like a miss. I can see a test not having any coverage to report if maybe there's no dependencies and --instrument_test_target is not set, but otherwise I fully expected bazel coverage invocations to fail if a genuine error occurs.
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
I started trying to make that script fail tests (I assume that would have made it more obvious in this case) #15420 but that breaks tests since they're currently relying on that because the host machines I guess aren't setup for coverage
Running into this again. Would it be possible to have whatever tests that depend on this use an environment variable or something to toggle the silencing behavior? It'd be extremely valuable to be able to see when generating coverage failed.
IMO the script needs to fail if any problem is encountered. Only the tests you mentioned in #18650 (comment) should use this flag and everything else should fail fast and loud so rules maintainers can start making sure coverage actually works.
Activity
UebelAndre commentedon Jun 13, 2023
#18634 (comment) seems like it would fix the issue of
rules_rustnot supporting--experimental_split_coverage_postprocessing.comius commentedon Aug 4, 2023
@c-mita please triage
keith commentedon Aug 4, 2023
I started trying to make that script fail tests (I assume that would have made it more obvious in this case) #15420 but that breaks tests since they're currently relying on that because the host machines I guess aren't setup for coverage
UebelAndre commentedon Jan 9, 2024
Running into this again. Would it be possible to have whatever tests that depend on this use an environment variable or something to toggle the silencing behavior? It'd be extremely valuable to be able to see when generating coverage failed.
keith commentedon Jan 9, 2024
Good idea, I added a flag to support that and enabled it for bazel CI, I wouldn't think users should ever use this #15420
keith commentedon Jan 9, 2024
alternatively we could hijack that env var to just set it to
trueor something, but this is probably more clearUebelAndre commentedon Jan 9, 2024
IMO the script needs to fail if any problem is encountered. Only the tests you mentioned in #18650 (comment) should use this flag and everything else should fail fast and loud so rules maintainers can start making sure coverage actually works.
Make CC_CODE_COVERAGE_SCRIPT failures fail tests