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

Closed
github-bot wants to merge 1 commit from gh-pr/13/head into gh-pr/13/base
Owner

@⁠artareias on GitHub · 2026-11-21 17:17 UTC · original
artareias:skip-tests-without-local-fixtures → main · +46 −1 · 3 files · 56 commits · closed without merging

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

**@⁠artareias** on GitHub · 2026-11-21 17:17 UTC · [original](https://github.com/omonkeyz/xbox-emulator/pull/13) `artareias:skip-tests-without-local-fixtures` → `main` · +46 −1 · 3 files · 56 commits · closed without merging ## 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)
The amp, fixtures and mesh tests read shader dumps from analysis/shaders,
which CONTRIBUTING.md says must never be committed. On a clean checkout the
directory does not exist, so 11 tests panicked with "missing fixture".

Skip those tests 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. The GPU mesh tests that require a mesh-capable adapter are left
unchanged on purpose.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 06:07:10 +00:00
github-bot closed this pull request 2026-11-26 06:07:10 +00:00
Author
Owner

@⁠omonkeyz on GitHub · 2026-11-22 13:18 UTC · original

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!

**@⁠omonkeyz** on GitHub · 2026-11-22 13:18 UTC · [original](https://github.com/omonkeyz/xbox-emulator/pull/13#issuecomment-7079718190) 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!
Author
Owner

@⁠copilot-pull-request-reviewer[bot] on GitHub · 2026-11-21 17:17 UTC · original · reviewed

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.

**@⁠copilot-pull-request-reviewer[bot]** on GitHub · 2026-11-21 17:17 UTC · [original](https://github.com/omonkeyz/xbox-emulator/pull/13#pullrequestreview-6006898093) · **reviewed** 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.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.