Skip to content

test: cover shader compilation script regressions#268

Draft
cursor[bot] wants to merge 1 commit into
next-gen-5from
cursor/missing-test-coverage-b95b
Draft

test: cover shader compilation script regressions#268
cursor[bot] wants to merge 1 commit into
next-gen-5from
cursor/missing-test-coverage-b95b

Conversation

@cursor

@cursor cursor Bot commented Jun 19, 2026

Copy link
Copy Markdown

Risky behavior now covered

  • scripts/compile_shaders.sh argument validation for --generated-dir
  • mocked shader compilation through generated output routing
  • RTX demo SPIR-V embed generation for rgen/rmiss/rchit blobs
  • Forward+ compute shader binding emission
  • --apply replacement behavior with backups of previous tracked shader blobs
  • cleanup of temporary .spv files

Test files added/updated

  • Added tests/scripts/test_compile_shaders_regressions.sh
  • Registered test_compile_shaders_regressions in CMakeLists.txt
  • Documented the test in tests/README.md

Why this reduces regression risk

The shader compilation script sits on the renderer build path and recently gained/changed RTX embed and generated-shader behavior. The new fixture test runs the script end-to-end without requiring Vulkan SDK tools or GPU hardware, so CI can catch script regressions before they corrupt generated shader blobs or omit embedded RTX shader data.

Validation

  • tests/scripts/test_compile_shaders_regressions.sh scripts/compile_shaders.sh
  • cmake -S . -B build-coverage-tests -DBUILD_TESTING=ON -DBUILD_UNIT_TESTS=OFF && ctest --test-dir build-coverage-tests -R test_compile_shaders_regressions --output-on-failure
  • ctest --test-dir build-coverage-tests -R 'test_compile_(engine_lto|shaders_regressions)' --output-on-failure
Open in Web View Automation 

Co-authored-by: Tim Fox <timfox@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant