Collect coverage from cc_binary data deps of java_test#15096
Collect coverage from cc_binary data deps of java_test#15096fmeum wants to merge 1 commit intobazelbuild:masterfrom
Conversation
5d6d396 to
f49de88
Compare
|
@c-mita Did you intentionally disable the integration test in 065e2e8#diff-6dd28028af8d621974915318831c0addec4e9fd91386698481c63e65e09d9d93? It does seem to pass both with and without this PR and the commit message does not mention the new tags. |
|
Yes, they were intentionally disabled, I guess I forgot to mention it in the commit. Those tests would have failed until java_tools was updated (the Java coverage stuff is part of it). Notice that the "head" tests (which build a fresh version of the java tooling) were not disabled. Looks like we simply forgot to re-enable the tests afterwards. Created #15100 to fix. |
|
Reviewing the rest of your PR will take me a little longer; I need to convince myself that nothing strange will happen. |
Before this commit, if a java_test executed a cc_binary from its data deps, coverage for this cc_binary would not be collected. This is fixed by adding the implicit `$collect_cc_coverage` attribute to BazelJavaTestRule, similar to how this is already done for BazelShTestRule.
f49de88 to
55c6023
Compare
c-mita
left a comment
There was a problem hiding this comment.
Part of me is surprised that this just "works". But I don't think there's an issue here; java_test already depends on the C++ toolchain.
I would like a "principled" way of handling coverage for multiple languages in a test rule, but this doesn't add anything in the way of complexity that would make me oppose it at this time.
|
@c-mita Let me know if you want to discuss possible principled ways to collect multi-language coverage in tests. I am aware of a design doc on this topic, but don't know what became of it. |
Before this commit, if a java_test executed a cc_binary from its data deps, coverage for this cc_binary would not be collected. This is fixed by adding the implicit `$collect_cc_coverage` attribute to BazelJavaTestRule, similar to how this is already done for BazelShTestRule. Fixes the Java part of bazelbuild#15098. Closes bazelbuild#15096. PiperOrigin-RevId: 438785232
|
@bazel-io fork 5.2.0 |
|
@bazel-io flag |
Before this commit, if a java_test executed a cc_binary from its data deps, coverage for this cc_binary would not be collected. This is fixed by adding the implicit `$collect_cc_coverage` attribute to BazelJavaTestRule, similar to how this is already done for BazelShTestRule. Fixes the Java part of bazelbuild#15098. Closes bazelbuild#15096. PiperOrigin-RevId: 438785232
Before this commit, if a java_test executed a cc_binary from its data deps, coverage for this cc_binary would not be collected. This is fixed by adding the implicit `$collect_cc_coverage` attribute to BazelJavaTestRule, similar to how this is already done for BazelShTestRule. Fixes the Java part of bazelbuild#15098. Closes bazelbuild#15096. PiperOrigin-RevId: 438785232
|
@bazel-io fork 5.2.0 |
Before this commit, if a java_test executed a cc_binary from its data deps, coverage for this cc_binary would not be collected. This is fixed by adding the implicit `$collect_cc_coverage` attribute to BazelJavaTestRule, similar to how this is already done for BazelShTestRule. Fixes the Java part of bazelbuild#15098. Closes bazelbuild#15096. PiperOrigin-RevId: 438785232
Before this commit, if a java_test executed a cc_binary from its data deps, coverage for this cc_binary would not be collected. This is fixed by adding the implicit `$collect_cc_coverage` attribute to BazelJavaTestRule, similar to how this is already done for BazelShTestRule. Fixes the Java part of #15098. Closes #15096. PiperOrigin-RevId: 438785232
Before this commit, if a java_test executed a cc_binary from its data
deps, coverage for this cc_binary would not be collected. This is fixed
by adding the implicit
$collect_cc_coverageattribute toBazelJavaTestRule, similar to how this is already done for
BazelShTestRule.
Fixes the Java part of #15098.