Runtime tests: copy shader fixtures through shader_fixture_path #3363

Merged
MoonEyes merged 2 commits from upstream-pr/3363 into main 2026-12-03 17:55:51 +00:00
MoonEyes commented 2026-12-03 16:27:27 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-03T16:27:27Z.


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

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5630554661 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3363). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-03T16:27:27Z. --- 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)_
merzleckeier commented 2026-12-03 17:14:26 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by merzleckeier on 2026-12-03T17:14:26Z.


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.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7386190818 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3363#issuecomment-7386190818). Originally posted by [merzleckeier](https://github.com/merzleckeier) on 2026-12-03T17:14:26Z. --- 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.
Kal0s-design commented 2026-12-03 17:14:44 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Kal0s-design on 2026-12-03T17:14:44Z.


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).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7386198913 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/3363#issuecomment-7386198913). Originally posted by [Kal0s-design](https://github.com/Kal0s-design) on 2026-12-03T17:14:44Z. --- 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).
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
ProjectLeonida/mandy!3363
No description provided.