[build] Make xtask coverage repeatable by cleaning llvm-cov artifacts; add opt-out flags#389
Open
Copilot wants to merge 11 commits into
Open
[build] Make xtask coverage repeatable by cleaning llvm-cov artifacts; add opt-out flags#389Copilot wants to merge 11 commits into
xtask coverage repeatable by cleaning llvm-cov artifacts; add opt-out flags#389Copilot wants to merge 11 commits into
Conversation
Agent-Logs-Url: https://github.com/Azure/azihsm-sdk/sessions/3acea3e5-e1c1-4e1c-90a1-fab216d155cd Co-authored-by: zimmy87 <5205889+zimmy87@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Azure/azihsm-sdk/sessions/3acea3e5-e1c1-4e1c-90a1-fab216d155cd Co-authored-by: zimmy87 <5205889+zimmy87@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix coverage xtask to clean artifacts before execution
Make May 19, 2026
xtask coverage repeatable by cleaning llvm-cov artifacts; add opt-out flags
Contributor
There was a problem hiding this comment.
Pull request overview
This PR makes cargo xtask coverage (and cargo xtask precheck --coverage) repeatable across reruns by default by cleaning stale cargo-llvm-cov artifacts up front, while adding explicit opt-out flags for cases where preserving artifacts is desired.
Changes:
- Added a default pre-run
cargo llvm-cov clean --workspacestep toxtask coverage, gated by a new--skip-cleanflag. - Added
--skip-coverage-cleantoxtask precheckand forwarded it toxtask coverage. - Added focused unit tests validating the new
Coverageclap flag default and opt-out behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
xtask/src/precheck.rs |
Adds --skip-coverage-clean and forwards it when invoking the coverage xtask. |
xtask/src/coverage.rs |
Adds --skip-clean, runs cargo llvm-cov clean --workspace by default, and includes clap parsing unit tests. |
…:Parser::try_parse_from, which is out of our control, & xtask gets ignored in coverage reports)
…thub.com/Azure/azihsm-sdk into copilot/fix-coverage-xtask-repeatability
xtask coverage repeatable by cleaning llvm-cov artifacts; add opt-out flagsxtask coverage repeatable by cleaning llvm-cov artifacts; add opt-out flags
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
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.
cargo xtask coverage(andprecheck --coverage) could fail on reruns due to stale*.profrawdata undertarget/llvm-cov-target. This change makes coverage runs repeatable by default and adds explicit CLI opt-outs where needed.Coverage command behavior
xtask coveragenow executescargo llvm-cov clean --workspacebefore running coverage jobs/reports.New CLI opt-out on coverage
--skip-cleantocargo xtask coverageto bypass the pre-run clean step when desired.Precheck integration
--skip-cleantocargo xtask precheck.