-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Remove unnecessary cc_test coverage handling
#20349
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
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cc_test handling of implicit coverage attributescc_test coverage handling
Collaborator
Author
|
@bazel-io flag |
Member
|
@bazel-io fork 7.0.0 |
fmeum
added a commit
to fmeum/with_cfg.bzl
that referenced
this pull request
Nov 29, 2023
In addition to the the normal setup consisting of implicit attributes and the use of `coverage_common.instrumented_files_info`, this also requires working around a bug in `cc_test`: bazelbuild/bazel#20349
fmeum
added a commit
to fmeum/with_cfg.bzl
that referenced
this pull request
Nov 29, 2023
In addition to the the normal setup consisting of implicit attributes and the use of `coverage_common.instrumented_files_info`, this also requires working around a bug in `cc_test`: bazelbuild/bazel#20349
fmeum
added a commit
to fmeum/with_cfg.bzl
that referenced
this pull request
Nov 29, 2023
In addition to the the normal setup consisting of implicit attributes and the use of `coverage_common.instrumented_files_info`, this also requires working around a bug in `cc_test`: bazelbuild/bazel#20349
fmeum
added a commit
to fmeum/with_cfg.bzl
that referenced
this pull request
Nov 29, 2023
In addition to the the normal setup consisting of implicit attributes and the use of `coverage_common.instrumented_files_info`, this also requires working around a bug in `cc_test`: bazelbuild/bazel#20349
Collaborator
Author
|
@buildbreaker2021 Friendly ping |
buildbreaker2021
approved these changes
Dec 8, 2023
bazel-io
pushed a commit
to bazel-io/bazel
that referenced
this pull request
Dec 21, 2023
Both the `lcov_merger` and the `collect_cc_coverage` script are obtained from "well-known" implicit attributes of Starlark rules and do not require any further special handling. Removing this special handling also fixes a fringe bug: When a `cc_test` is wrapped in another test target that applies a transition to it, the removed logic set the `LCOV_MERGER` variable to the untransitioned path of the `lcov_merger`, which will then not be available in the test sandbox since it is only added as a runfile, but the test action references it via its exec path. This resulted in a "file not found" error that broke coverage. Closes bazelbuild#20349. PiperOrigin-RevId: 589252093 Change-Id: I810f1b414dcfedcc8930a74390ef5c9bfd2cd030
github-merge-queue bot
pushed a commit
that referenced
this pull request
Jan 9, 2024
Both the `lcov_merger` and the `collect_cc_coverage` script are obtained from "well-known" implicit attributes of Starlark rules and do not require any further special handling. Removing this special handling also fixes a fringe bug: When a `cc_test` is wrapped in another test target that applies a transition to it, the removed logic set the `LCOV_MERGER` variable to the untransitioned path of the `lcov_merger`, which will then not be available in the test sandbox since it is only added as a runfile, but the test action references it via its exec path. This resulted in a "file not found" error that broke coverage. Closes #20349. Commit 591d125 PiperOrigin-RevId: 589252093 Change-Id: I810f1b414dcfedcc8930a74390ef5c9bfd2cd030 Co-authored-by: Fabian Meumertzheim <[email protected]> Co-authored-by: Ian (Hee) Cha <[email protected]>
Member
|
The changes in this PR have been included in Bazel 7.1.0 RC1. Please test out the release candidate and report any issues as soon as possible. If you're using Bazelisk, you can point to the latest RC by setting USE_BAZEL_VERSION=last_rc. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Both the
lcov_mergerand thecollect_cc_coveragescript are obtained from "well-known" implicit attributes of Starlark rules and do not require any further special handling.Removing this special handling also fixes a fringe bug: When a
cc_testis wrapped in another test target that applies a transition to it, the removed logic set theLCOV_MERGERvariable to the untransitioned path of thelcov_merger, which will then not be available in the test sandbox since it is only added as a runfile, but the test action references it via its exec path. This resulted in a "file not found" error that broke coverage.