-
Notifications
You must be signed in to change notification settings - Fork 4.2k
bazel coverage
returns empty coverage files for cc_test
with remote execution
#13193
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
Comments
bazel coverage
fails for cc_test
with remote executionbazel coverage
returns empty coverage files for cc_test
with remote execution
@oquenchil bazel/tools/test/collect_coverage.sh Line 182 in 26c7e10
When I look in the test logs, I see this:
Bazel should probably error out here. |
This is what is causing empty files to be written: bazel/tools/test/collect_coverage.sh Line 176 in 26c7e10
|
Merged It looks like it is also failing on this line: bazel/tools/test/collect_cc_coverage.sh Line 129 in 26c7e10
The logs indicate it cannot find the files it wants which is interesting because I can find those files locally. They probably aren't being included e.g
Yet I can see this file here:
|
@oquenchil - Fairly sure the problem is that the |
I have managed to fix this by adding the following change to bazel 4.0.0.
I'm curious as to why this is called I figured out that the |
It's called The missing inputs certainly looks like an oversight. That should also break with sandboxing unless I'm mistaken, so it's odd this wasn't caught before. Are you already using the new code path? |
These flags don't work locally with sandboxing: #13185 and my guess is that Bazel does not currently test this part of the codebase (at least in Bazel 4.0.0). Interestingly if
Yes as the workaround I've added finally allows you to easily return the |
Fixed in : |
Hi, trying my luck here before opening a new issue: |
Hi All, |
Can take a look if you have an example repo to share? |
Can't share the repo but its a monorepo written in Go and kotlin. bazel coverage --combined_report=lcov //
|
Hi @bhushan-helloFresh , |
@nstng |
what's the gcov versiion? |
Apple LLVM version 13.1.6 (clang-1316.0.21.2.5) |
I don't have a macbook infront of me today but could you quickly see if you can reproduce the problem with this repo? |
the same |
Uh oh!
There was an error while loading. Please reload this page.
Description of the problem:
Bazel coverage fails with remote execution for
cc_test
.Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Either run
bazel coverage
on your own RE infrastructure of follow the example posted here:#4685 (comment)
Using an example such as abseil-cpp:
You'll notice coverage executes but the coverage files are returned empty. These files are not empty if executed locally (without the extra flags or it will crash).
What operating system are you running Bazel on?
Linux 5.10.16-arch1-1
What's the output of
bazel info release
?release 4.0.0
Have you found anything relevant by searching the web?
#13185
#4685
Any other information, logs, or outputs that you want to share?
The text was updated successfully, but these errors were encountered: