From 97691daa29270bec0f7cd41fd1bca9220a5ca521 Mon Sep 17 00:00:00 2001 From: fiestorra Date: Tue, 1 Dec 2026 01:29:41 +0100 Subject: [PATCH] docs/testing: LEONIDA_SHADERS changes which tests pass, not just which run The suite section already warns that a passing percentage does not mean the tests ran. This adds the other half: one variable changes the answers. Measured on main cd9fe51a9 with a translated corpus exported for shader_library_corpus, 575 ran and four failed; from a shell without it, one failed and the two in the middle passed in 0.23 s and 0.31 s on their own. --- docs/testing.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/testing.md b/docs/testing.md index 635c700a65..fa659712e3 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -241,6 +241,15 @@ alone does not establish that they ran. Check the CMake configure messages and l configured tests with `ctest --test-dir runtime/build -C RelWithDebInfo -N` before comparing test counts. After installing missing tools, rerun CMake in an environment where they are visible and rebuild. +`LEONIDA_SHADERS` is one environment variable that changes which tests pass, not just which ones run. +It is what `shader_library_corpus` reads, and `d3d12_descriptor` and `d3d12_r9g9b9e5_uav` also pick up +whatever it names. Set to a translated corpus and left in the shell, a full suite reported four +failures on one machine (`display_white_cache`, `d3d12_descriptor`, `d3d12_r9g9b9e5_uav`, +`xbox_present`); the same suite from a shell without it reported one (`xbox_present`), and the two +middle tests passed in under half a second each on their own. Set the variable for the corpus test +only, or pass it on that test's command line, so the rest of the suite runs in the environment it was +written for. + Windows, from a "Developer PowerShell for VS 2022" or a plain shell: