Skip to content

Collect C++ lcov coverage if runtime object not in runfiles#15299

Merged
ckolli5 merged 1 commit intobazelbuild:release-5.2.0from
fmeum:release-5.2.0-15118
May 9, 2022
Merged

Collect C++ lcov coverage if runtime object not in runfiles#15299
ckolli5 merged 1 commit intobazelbuild:release-5.2.0from
fmeum:release-5.2.0-15118

Conversation

@fmeum
Copy link
Copy Markdown
Collaborator

@fmeum fmeum commented Apr 20, 2022

Before this commit, collecting C++ coverage in lcov format would fail
at the llvm-cov export step if a shared library listed in the
runtime_objects_list.txt was not contained in the runfiles of the top-
level target. This can happen e.g. if a cc_library depends on a
java_binary that has a cc_binary shared library in its resources.

This is fixed by not including objects that don't exist at runtime
in the llvm-cov invocation.

Fixes #15121.

Closes #15118.

PiperOrigin-RevId: 442799461

Fixes #15290.

Before this commit, collecting C++ coverage in lcov format would fail
at the llvm-cov export step if a shared library listed in the
runtime_objects_list.txt was not contained in the runfiles of the top-
level target. This can happen e.g. if a cc_library depends on a
java_binary that has a cc_binary shared library in its resources.

This is fixed by not including objects that don't exist at runtime
in the llvm-cov invocation.

Fixes bazelbuild#15121.

Closes bazelbuild#15118.

PiperOrigin-RevId: 442799461
@fmeum fmeum requested a review from ckolli5 as a code owner April 20, 2022 09:13
@ckolli5 ckolli5 added the team-Rules-CPP Issues for C++ rules label Apr 20, 2022
@ckolli5 ckolli5 requested a review from oquenchil April 20, 2022 20:23
@c-mita c-mita self-requested a review April 21, 2022 11:09
@c-mita c-mita self-assigned this Apr 21, 2022
@ckolli5 ckolli5 added the awaiting-review PR is awaiting review from an assigned reviewer label Apr 26, 2022
@oquenchil oquenchil removed their request for review May 5, 2022 07:35
@ckolli5 ckolli5 merged commit 307162d into bazelbuild:release-5.2.0 May 9, 2022
@fmeum fmeum deleted the release-5.2.0-15118 branch July 1, 2022 07:20
@ShreeM01 ShreeM01 removed the awaiting-review PR is awaiting review from an assigned reviewer label Sep 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

coverage team-Rules-CPP Issues for C++ rules

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants