Runtime tests: copy shader fixtures through shader_fixture_path #3363

Manually merged
github merged 2 commits from github-bot/gh-3363 into gh-pr/3363/base 2026-12-03 18:06:13 +00:00 AGit
Owner

@⁠MoonEyes on GitHub · 2026-12-03 16:27 UTC · original
ProjectLeonida:fix/runtime-test-fixture-paths → main · +38 −27 · 8 files · 2 commits · merged 2026-12-03 17:55 UTC

Claimed in the coordination issue as: runtime tests copying a compiled-in shader path (claim comment in #3312)

Depends on: #3359 (same pattern; the files are distinct, git merge-tree shows no conflict)

What and why

Eight tests copy their shader with a raw, throwing std::filesystem::copy_file(LEONIDA_*_SPV, ...). From the extracted runtime-windows artifact the baked-in path does not exist, so the exception is uncaught and the test aborts with 0xC0000409 (as in #2978). Each copy now goes through testfiles::copy_file(vktest::shader_fixture_path(MACRO), dest) and returns 1 with a readable message on failure. d3d12_typeless_families_test already used a non-throwing copy but had no fallback; it gets one. When the compiled path exists, the behaviour is unchanged. No new helper, CMakeLists.txt untouched.

Tested

  • python -I scripts/check_no_game_data.py, test_docs_* (59) and cmake -S runtime configure on Linux.
  • Read-only review: every new return 1 is directly in int main, signatures and includes, no raw copy left in the eight files, git merge-tree against main and #3219 (the only other PR touching d3d12_mesh_test.cpp) is clean; one line over 120 columns was wrapped.
  • Not run: compilation (MSVC, Vulkan, GPU) and the tests from an extracted artifact, so no red/green.

GPUs tested: n/a

AI-assisted: yes. Written with Claude Sonnet 5.5; independently reviewed read-only by Claude Opus 5.5.

Checklist

  • Based on current main and merges cleanly.
  • One topic.
  • No game data, keys or decryption.
  • Not a translator rule.

Generated by Claude Code

**@⁠MoonEyes** on GitHub · 2026-12-03 16:27 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3363) `ProjectLeonida:fix/runtime-test-fixture-paths` → `main` · +38 −27 · 8 files · 2 commits · merged 2026-12-03 17:55 UTC Claimed in the coordination issue as: runtime tests copying a compiled-in shader path (claim comment in #3312) Depends on: #3359 (same pattern; the files are distinct, `git merge-tree` shows no conflict) ### What and why Eight tests copy their shader with a raw, throwing `std::filesystem::copy_file(LEONIDA_*_SPV, ...)`. From the extracted `runtime-windows` artifact the baked-in path does not exist, so the exception is uncaught and the test aborts with 0xC0000409 (as in #2978). Each copy now goes through `testfiles::copy_file(vktest::shader_fixture_path(MACRO), dest)` and returns 1 with a readable message on failure. `d3d12_typeless_families_test` already used a non-throwing copy but had no fallback; it gets one. When the compiled path exists, the behaviour is unchanged. No new helper, `CMakeLists.txt` untouched. ### Tested - `python -I scripts/check_no_game_data.py`, `test_docs_*` (59) and `cmake -S runtime` configure on Linux. - Read-only review: every new `return 1` is directly in `int main`, signatures and includes, no raw copy left in the eight files, `git merge-tree` against `main` and #3219 (the only other PR touching `d3d12_mesh_test.cpp`) is clean; one line over 120 columns was wrapped. - Not run: compilation (MSVC, Vulkan, GPU) and the tests from an extracted artifact, so no red/green. GPUs tested: n/a AI-assisted: yes. Written with Claude Sonnet 5.5; independently reviewed read-only by Claude Opus 5.5. ### Checklist - [x] Based on current `main` and merges cleanly. - [x] One topic. - [x] No game data, keys or decryption. - [x] Not a translator rule. --- _Generated by [Claude Code](https://claude.ai/code)_
Same pattern as #3359 (d3d12_depth_resolve_test): the SPIR-V path compiled into the test is the build machine's, so an extracted CI artifact must look under generated/ (vktest::shader_fixture_path), and a missing file must print why and return 1 (testfiles::copy_file) instead of letting std::filesystem::copy_file throw and end the test with an abort (0xC0000409) and no message.

Fixed: d3d12_state_sweep, d3d12_depth24_draw, d3d12_geometry, d3d12_mesh, d3d12_bindless_churn (throwing copy, no fallback), d3d12_indirect_dispatch_count, d3d12_stores_atomics (fallback present, copy threw), d3d12_typeless_families (non-throwing copy, no fallback). The read_spv readers are left for another PR.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01DDMsHwsknvo96XTWag2WiL
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01DDMsHwsknvo96XTWag2WiL
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-03 16:32:51 +00:00
Author
Owner

@⁠merzleckeier on GitHub · 2026-12-03 17:14 UTC · original

Reviewed #3363 at b374466 and #3362 at 0a7d457 on 09273248, with #3359, #3366, and #3368 included. The five heads merge cleanly and the fixture-path unit test passes with the combined helper.

  • Copies (#3363): I compiled the eight exact copy blocks with GCC using the fixture names from CMake. With just the packaged fixtures, five original blocks aborted, the typeless block returned 1, and the two already using the lookup passed. All eight updated blocks staged the expected bytes. They preferred the original local files when present and returned 1 with a copy diagnostic when both paths were missing.
  • Reads (#3362): I compiled the five exact reader blocks and tried all seven fixture names. The original readers missed the packaged files. The updated readers found all seven, preferred local files when present, and returned failure for a missing file.

These were synthetic filesystem tests on Linux. The full Windows/Vulkan executables were not run. Review assisted by OpenAI Codex.

**@⁠merzleckeier** on GitHub · 2026-12-03 17:14 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3363#issuecomment-7386190818) Reviewed #3363 at `b374466` and #3362 at `0a7d457` on `09273248`, with #3359, #3366, and #3368 included. The five heads merge cleanly and the fixture-path unit test passes with the combined helper. - **Copies (#3363):** I compiled the eight exact copy blocks with GCC using the fixture names from CMake. With just the packaged fixtures, five original blocks aborted, the typeless block returned 1, and the two already using the lookup passed. All eight updated blocks staged the expected bytes. They preferred the original local files when present and returned 1 with a copy diagnostic when both paths were missing. - **Reads (#3362):** I compiled the five exact reader blocks and tried all seven fixture names. The original readers missed the packaged files. The updated readers found all seven, preferred local files when present, and returned failure for a missing file. These were synthetic filesystem tests on Linux. The full Windows/Vulkan executables were not run. Review assisted by OpenAI Codex.
Author
Owner

@⁠Kal0s-design on GitHub · 2026-12-03 17:14 UTC · original

Ran natively on Windows 11, head b37446609 merged into current main (fba6f09ce, clean merge).

No findings. MSVC build (CMake + Ninja, RelWithDebInfo) of all eight targets, no new warnings in them. None of the fixtures are in the checkout; glslangValidator compiles them into the build's generated/. To mimic the artifact I hid that folder and ran each exe from a directory with a copy of it as generated/.

test normal run, main / merge compiled path gone, generated/ in cwd, main / merge fixture missing, main / merge
d3d12_bindless_churn_test 0 / 0 0xC0000409 / 0 0xC0000409 / 1
d3d12_depth24_draw_test 0 / 0 0xC0000409 / 0 0xC0000409 / 1
d3d12_geometry_test 0 / 0 0xC0000409 / 0 0xC0000409 / 1
d3d12_mesh_test 0 / 0 0xC0000409 / 0 0xC0000409 / 1
d3d12_state_sweep_test 0 / 0 0xC0000409 / 0 0xC0000409 / 1
d3d12_typeless_families_test 0 / 0 1 (cannot copy) / 0 1 / 1
d3d12_indirect_dispatch_count_test 0 / 0 0 / 0 0xC0000409 / 1
d3d12_stores_atomics_test 0 / 0 0 / 0 0xC0000409 / 1

The last two already used shader_fixture_path on main, so for them the only change is that a missing fixture now gives a readable exit 1 instead of the abort. In every missing case the merge prints cannot copy ... naming the file. The main column was measured on 717b90233; nothing under runtime/ changed since.

Not checked: a real downloaded CI artifact, CTest itself.

GPUs tested: one NVIDIA desktop card (native Vulkan), plus WARP where the tests compare with it.
AI-assisted: yes (Claude Code).

**@⁠Kal0s-design** on GitHub · 2026-12-03 17:14 UTC · [original](https://github.com/ProjectLeonida/mandy/pull/3363#issuecomment-7386198913) Ran natively on Windows 11, head `b37446609` merged into current `main` (`fba6f09ce`, clean merge). No findings. MSVC build (CMake + Ninja, RelWithDebInfo) of all eight targets, no new warnings in them. None of the fixtures are in the checkout; glslangValidator compiles them into the build's `generated/`. To mimic the artifact I hid that folder and ran each exe from a directory with a copy of it as `generated/`. | test | normal run, `main` / merge | compiled path gone, `generated/` in cwd, `main` / merge | fixture missing, `main` / merge | |---|---|---|---| | `d3d12_bindless_churn_test` | 0 / 0 | 0xC0000409 / 0 | 0xC0000409 / 1 | | `d3d12_depth24_draw_test` | 0 / 0 | 0xC0000409 / 0 | 0xC0000409 / 1 | | `d3d12_geometry_test` | 0 / 0 | 0xC0000409 / 0 | 0xC0000409 / 1 | | `d3d12_mesh_test` | 0 / 0 | 0xC0000409 / 0 | 0xC0000409 / 1 | | `d3d12_state_sweep_test` | 0 / 0 | 0xC0000409 / 0 | 0xC0000409 / 1 | | `d3d12_typeless_families_test` | 0 / 0 | 1 (`cannot copy`) / 0 | 1 / 1 | | `d3d12_indirect_dispatch_count_test` | 0 / 0 | 0 / 0 | 0xC0000409 / 1 | | `d3d12_stores_atomics_test` | 0 / 0 | 0 / 0 | 0xC0000409 / 1 | The last two already used `shader_fixture_path` on `main`, so for them the only change is that a missing fixture now gives a readable exit 1 instead of the abort. In every missing case the merge prints `cannot copy ...` naming the file. The `main` column was measured on `717b90233`; nothing under `runtime/` changed since. Not checked: a real downloaded CI artifact, CTest itself. GPUs tested: one NVIDIA desktop card (native Vulkan), plus WARP where the tests compare with it. AI-assisted: yes (Claude Code).
github-bot changed target branch from main to gh-pr/3363/base 2026-12-03 18:06:00 +00:00
github manually merged commit b374466097 into gh-pr/3363/base 2026-12-03 18:06:13 +00:00
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/ubiquitarianism--leonida!3363
No description provided.