-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
No coverage data if testing code from external repositories #16208
Comments
Removes hardcoded filters that result in no coverage being reported for `cc_*` targets in external repositories even when matched by the `--instrumentation_filter`. Work towards #16228 Work towards #16208 Closes #16261. PiperOrigin-RevId: 483911568 Change-Id: Ibca6fb39a8e946e06beeb03414ad8ccbc42f53d6
Removes hardcoded filters that result in no coverage being reported for `cc_*` targets in external repositories even when matched by the `--instrumentation_filter`. Work towards bazelbuild#16228 Work towards bazelbuild#16208 Closes bazelbuild#16261. PiperOrigin-RevId: 483911568 Change-Id: Ibca6fb39a8e946e06beeb03414ad8ccbc42f53d6
Removes hardcoded filters that result in no coverage being reported for `cc_*` targets in external repositories even when matched by the `--instrumentation_filter`. Work towards #16228 Work towards #16208 Closes #16261. PiperOrigin-RevId: 483911568 Change-Id: Ibca6fb39a8e946e06beeb03414ad8ccbc42f53d6
* Removes a hardcoded filter that results in the LCOV merger filtering out coverage of external targets even if these are matched by `--instrumentation_filter`. * Lets `LazyWritePathsFileAction` write out exec rather than root-relative paths, as advertised by its javadocs, so that the paths match those that the LCOV mergers filters by. Work towards #16228 Work towards #16208 Closes #16268. PiperOrigin-RevId: 485580267 Change-Id: I830d3cf903462ca1799ef5f659a620dbdb92f349
* Removes a hardcoded filter that results in the LCOV merger filtering out coverage of external targets even if these are matched by `--instrumentation_filter`. * Lets `LazyWritePathsFileAction` write out exec rather than root-relative paths, as advertised by its javadocs, so that the paths match those that the LCOV mergers filters by. Work towards bazelbuild#16228 Work towards bazelbuild#16208 Closes bazelbuild#16268. PiperOrigin-RevId: 485580267 Change-Id: I830d3cf903462ca1799ef5f659a620dbdb92f349
* Removes a hardcoded filter that results in the LCOV merger filtering out coverage of external targets even if these are matched by `--instrumentation_filter`. * Lets `LazyWritePathsFileAction` write out exec rather than root-relative paths, as advertised by its javadocs, so that the paths match those that the LCOV mergers filters by. Work towards #16228 Work towards #16208 Closes #16268. PiperOrigin-RevId: 485580267 Change-Id: I830d3cf903462ca1799ef5f659a620dbdb92f349
@fmeum This will be available in 6.0.0 if I understand it correctly, right? Should I close it only then, after having verified it? |
@celkas Yes, both commits are going to be in 6.0.0. You can close the issue if everything works for you with these changes. |
@fmeum Tested it with 6.0.0rc1. Still failing. States Did also some more tests with
|
@celkas Sorry, the changes were cherry-picked after the RC cut. Could you try again with |
@fmeum Great, it works! I still need to somehow tackle the path problems with
|
Solved in 6.0.0 |
We're rolling #16637 back since it's breaking some internal tests :( Reopening to keep track of it again. |
As of now as a workaround for this problem, I use an intermediate version, e.g. Usage for this test repo:
|
@fmeum As an aside: |
@celkas That's always going to be a problem as external repositories aren't materialized in your workspace, they only exist under the Bazel output base. Does genhtml let you specify additional source roots? If so, you could use that instead of the symlink. If there isn't, some |
@fmeum does that need to/can that be cherry-picked into 6.1.0? |
@bazel-io flag |
@bazel-io fork 6.1.0 |
Description of the bug:
Using software and tests in the same repository is no problem, coverage data are produced.
Splitting the two makes problems. There is "no coverage data" produced anymore.
It seems that coverage data is generated, but not consumed, maybe because of some path issue/mismatch.
If I also instrument the tests, the test's coverage will be copied into the combined coverage file, but still no software coverage.
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Minimal example in this test repo. This will use this software repo and produce no coverage.
Simply check it out and run
This will say
WARNING: There was no coverage found.
Which operating system are you running Bazel on?
Debian (WSL2)
What is the output of
bazel info release
?release 5.3.0
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse master; git rev-parse HEAD
?No response
Have you found anything relevant by searching the web?
I did not find anything searching.
In this Slack discussion I was encouraged to create an issue.
Any other information, logs, or outputs that you want to share?
I can see in the testlog that coverage info is build. Then it is processed but no data is found.
The text was updated successfully, but these errors were encountered: