harness: tidy build.rs comment + extract Fixture::fail helper - #4367
Merged
Kenny Kerr (kennykerr) merged 1 commit intoMay 2, 2026
Merged
Conversation
Agent-Logs-Url: https://github.com/microsoft/windows-rs/sessions/747e7402-9ff1-4f36-9eaf-6c58ac202876 Co-authored-by: kennykerr <9845234+kennykerr@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
Kenny Kerr (kennykerr)
May 2, 2026 01:40
View session
Kenny Kerr (kennykerr)
marked this pull request as ready for review
May 2, 2026 01:40
Contributor
There was a problem hiding this comment.
Pull request overview
Cleans up the test-fixtures harness by correcting build.rs documentation and centralizing fixture failure formatting in a Fixture::fail helper, keeping panic output consistent across group runners.
Changes:
- Update
build.rstop-level comment to reflect that generated tests callcrate::run_fixture(group, name)and remove a dead unused-variable suppression. - Add
Fixture::fail(stage, error)and route most framedunwrap_or_else(... panic!(...))sites through it for uniform error messages.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| crates/tests/fixtures/harness/tests/fixtures.rs | Adds Fixture::fail and refactors runner error handling to use it for consistent [group/name] stage: error panics. |
| crates/tests/fixtures/harness/build.rs | Fixes misleading comment about generated test dispatch and removes unnecessary groups mutability/unused suppression. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Kenny Kerr (kennykerr)
deleted the
copilot/cleanup-code-and-simplify-testing
branch
May 2, 2026 11:47
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.
Low-risk cleanup of seams left in
crates/tests/fixtures/harness/after the recent test-consolidation churn (#4339, #4342, #4344, #4347–#4354, #4365). No behaviour change.build.rsharness::run_<group>(name)in the lib; in factbuild.rsemitscrate::run_fixture(group, name)and the dispatcher lives intests/fixtures.rs. Updated.let _ = &mut groups;(and its incorrect "suppress unused warning" comment) —groupsis iterated unconditionally on the line above.tests/fixtures.rsFixture::fail(stage, error)and routed 12 of the 14unwrap_or_else(|e| panic!("[{}/{}] ...: {e}", f.group, f.name))sites through it.stage: impl Displaysoformat_args!("reader({path})")works without an extra allocation. The twounwrap_or_else(|| panic!(...))("expected to fail but succeeded") sites have a different shape and are left alone.Verified that doc/CI sweep items from the plan (stale references to retired
docs/{test,cross}-todo.md,linux.yml,tests/roundtrip/*, pre-renameGeneric<T>/Ref) are already clean — no edits needed.Out of scope, deferred to focused follow-ups: lifting the
cfg(windows)gate oncompile_fixtures.rs, replacing the hand-rolledfixture.tomlparser with a real TOML dep, reshapingkind = "reader_no_input", and themsrv.yml/no_std.yml/slim_errors.ymlworkflow merges.