Skip to content

Skip analysis tests when coverage is run.#107

Merged
copybara-service[bot] merged 1 commit intomasterfrom
test_676903010
Sep 23, 2024
Merged

Skip analysis tests when coverage is run.#107
copybara-service[bot] merged 1 commit intomasterfrom
test_676903010

Conversation

@copybara-service
Copy link

Skip analysis tests when coverage is run.

Apparently, bazel coverage will run the execution phase, even for analysis
tests. This is error-prone, however, because analysis tests may not depend
on fully buildable targets.

To mitigate this, use target_compatible_with to make them as incompatible
when coverage is run.

Analysis tests don't implement any sort of coverage support, so nothing is
lost.

Along the way, add starlark_analysis_test tag to analysis tests. This makes
it easier to match them using --test_tag_filters to include/exclude them in
CI configs.

FUTURE_COPYBARA_INTEGRATE_REVIEW=#100 from bazelbuild:lberki-update-stardoc c78f471

@copybara-service copybara-service bot requested a review from comius as a code owner September 20, 2024 18:08
@copybara-service copybara-service bot force-pushed the test_676903010 branch 4 times, most recently from 9ee403b to c6983e4 Compare September 23, 2024 08:25
Apparently, `bazel coverage` will run the execution phase, even for analysis
tests. This is error-prone, however, because analysis tests may not depend
on fully buildable targets.

To mitigate this, use `target_compatible_with` to make them as incompatible
when coverage is run.

Analysis tests don't implement any sort of coverage support, so nothing is
lost.

Along the way, add `starlark_analysis_test` tag to analysis tests. This makes
it easier to match them using `--test_tag_filters` to include/exclude them in
CI configs.

PiperOrigin-RevId: 677681699
@copybara-service copybara-service bot merged commit 724bf64 into master Sep 23, 2024
@copybara-service copybara-service bot deleted the test_676903010 branch September 23, 2024 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant