tombox-xshader tests: skip when local shader fixtures are absent #13

Closed
artareias wants to merge 0 commits from upstream-pr/13 into main
artareias commented 2026-11-21 17:17:47 +00:00 (Migrated from github.com)

Imported from omonkeyz/xbox-emulator. Originally posted by artareias on 2026-11-21T17:17:47Z.


Problem

tombox-xshader's amp, fixtures and mesh tests read shader dumps from analysis/shaders, which CONTRIBUTING.md says must never be committed. On a clean checkout that directory does not exist, so 11 tests panic with missing fixture ....

Change

  • Tests that need local fixtures now skip with a notice when the fixture directory is absent.
  • When the directory exists, a missing file still fails the test, so real regressions are not hidden.
  • gta_mesh_programs_extract_with_mesh_runtime_info uses let Some(dir) = gta_dir() else { ... return } instead of expect.

Not changed on purpose: the GPU mesh tests that assert a mesh-capable adapter (they tell you to rerun with TOMBOX_EXEC_HW=1).

Testing

cargo test -p tombox-xshader --test amp --test fixtures --test mesh on a clean clone (Windows 11, MSVC, no analysis/): amp 4/4 and fixtures 6/6 pass, mesh 10/14 pass. The 4 remaining failures are unrelated to this change:

  • 3 GPU mesh tests on WARP (MeshShaderTier 0, by design).
  • mesh_refusals_are_explicit fails at mesh.rs:247: a mesh shader with payload_bytes = 16 is no longer refused, which looks like a stale expectation now that hlsl/mesh.rs handles payloads. Not touched here.

🤖 Generated with Claude Code

<!-- greyfinch-sync:omonkeyz/xbox-emulator:issue:6531989483 --> Imported from [omonkeyz/xbox-emulator](https://github.com/omonkeyz/xbox-emulator/pull/13). Originally posted by [artareias](https://github.com/artareias) on 2026-11-21T17:17:47Z. --- ## Problem `tombox-xshader`'s `amp`, `fixtures` and `mesh` tests read shader dumps from `analysis/shaders`, which CONTRIBUTING.md says must never be committed. On a clean checkout that directory does not exist, so 11 tests panic with `missing fixture ...`. ## Change - Tests that need local fixtures now skip with a notice when the fixture directory is absent. - When the directory exists, a missing file still fails the test, so real regressions are not hidden. - `gta_mesh_programs_extract_with_mesh_runtime_info` uses `let Some(dir) = gta_dir() else { ... return }` instead of `expect`. Not changed on purpose: the GPU mesh tests that assert a mesh-capable adapter (they tell you to rerun with `TOMBOX_EXEC_HW=1`). ## Testing `cargo test -p tombox-xshader --test amp --test fixtures --test mesh` on a clean clone (Windows 11, MSVC, no `analysis/`): amp 4/4 and fixtures 6/6 pass, mesh 10/14 pass. The 4 remaining failures are unrelated to this change: - 3 GPU mesh tests on WARP (`MeshShaderTier 0`, by design). - `mesh_refusals_are_explicit` fails at `mesh.rs:247`: a mesh shader with `payload_bytes = 16` is no longer refused, which looks like a stale expectation now that `hlsl/mesh.rs` handles payloads. Not touched here. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
copilot-pull-request-reviewer[bot] commented 2026-11-21 17:17:55 +00:00 (Migrated from github.com)

Imported from omonkeyz/xbox-emulator. Originally posted by copilot-pull-request-reviewer[bot] on 2026-11-21T17:17:55Z.

Review: COMMENTED


Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

<!-- greyfinch-sync:omonkeyz/xbox-emulator:review:6006898093 --> Imported from [omonkeyz/xbox-emulator](https://github.com/omonkeyz/xbox-emulator/pull/13#pullrequestreview-6006898093). Originally posted by [copilot-pull-request-reviewer[bot]](https://github.com/apps/copilot-pull-request-reviewer) on 2026-11-21T17:17:55Z. **Review:** COMMENTED --- Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
omonkeyz commented 2026-11-22 13:18:44 +00:00 (Migrated from github.com)

Imported from omonkeyz/xbox-emulator. Originally posted by omonkeyz on 2026-11-22T13:18:44Z.


Main's history was rewritten, which auto-closed this PR. Main already covers this: the fixture tests are #[ignore]d unless the tombox_fixtures_* cfg is set (1fc8683), so a clean checkout passes. Thanks!

<!-- greyfinch-sync:omonkeyz/xbox-emulator:comment:7079718190 --> Imported from [omonkeyz/xbox-emulator](https://github.com/omonkeyz/xbox-emulator/pull/13#issuecomment-7079718190). Originally posted by [omonkeyz](https://github.com/omonkeyz) on 2026-11-22T13:18:44Z. --- Main's history was rewritten, which auto-closed this PR. Main already covers this: the fixture tests are #[ignore]d unless the tombox_fixtures_* cfg is set (1fc8683), so a clean checkout passes. Thanks!

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
omonkeyz/xbox-emulator!13
No description provided.