Skip to content
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

Make coverage --combined_report=lcov skip incompatible tests #15471

Conversation

philsc
Copy link
Contributor

@philsc philsc commented May 12, 2022

Before this patch we see coverage trying to execute incompatible
tests. This results in Can't build this. This target is incompatible
messages. Instead, those tests should just be skipped.

This patch makes it so the coverage code only tries to collect
coverage artifacts for compatible tests. Artifacts for incompatible
tests are ignored.

(cherry picked from commit 2f1ff6f)

Fixes #15385

@philsc philsc requested a review from ckolli5 as a code owner May 12, 2022 02:44
@philsc
Copy link
Contributor Author

philsc commented May 12, 2022

Apologies for the last minute cherry-picks. If they have to wait until 5.3, that's fine too.

@sgowroji sgowroji added the team-Rules-CPP Issues for C++ rules label May 13, 2022
@ckolli5
Copy link

ckolli5 commented May 18, 2022

@philsc Could you please rebase your branch with the latest release-5.2.0 branch? Thanks!

Before this patch we see coverage trying to execute incompatible
tests. This results in `Can't build this. This target is incompatible`
messages. Instead, those tests should just be skipped.

This patch makes it so the coverage code only tries to collect
coverage artifacts for compatible tests. Artifacts for incompatible
tests are ignored.

Fixes bazelbuild#15385

Closes bazelbuild#15419.

PiperOrigin-RevId: 447710011
(cherry picked from commit 2f1ff6f)
@philsc philsc force-pushed the cherry-pick-5.2-fix-incompatible-coverage branch from e986321 to 4bba523 Compare May 18, 2022 21:09
@philsc
Copy link
Contributor Author

philsc commented May 18, 2022

Done

@philsc
Copy link
Contributor Author

philsc commented May 19, 2022

@ckolli5, is it possible that the failing test is flaky? The bork stack traces don't mean anything to me and I cannot reproduce the failure locally. I also don't have permissions to retry the job.

@ckolli5
Copy link

ckolli5 commented May 19, 2022

@philsc Looks like the errors are flaky. I will re-run the presubmit jobs and see if that is flaky error.

@ckolli5 ckolli5 merged commit 18d1ede into bazelbuild:release-5.2.0 May 19, 2022
@philsc philsc deleted the cherry-pick-5.2-fix-incompatible-coverage branch May 19, 2022 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-Rules-CPP Issues for C++ rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants