Repository navigation
test_docs_cli_flags: spirv-opt passes are another program's flags (main is red) - #8290
evilclanker9000 wants to merge 3 commits into
Conversation
docs/embedded_shaders.md quotes seven spirv-opt passes and one local SSA probe pass that no tool in the repository takes, so test_docs_name_existing_flags failed on main (7 flags on lines 372-377). List them in FOREIGN next to the gh and pip flags it already carries.
…eturn and --scalar-replacement passes
The new control fails on the pre-fix module, which reports both --merge-return and the unknown flag for the same line, and passes once spirv-opt's passes are in FOREIGN.
devnull34
left a comment
There was a problem hiding this comment.
Verified via Tier 2 Free Cloud & local test execution: Adding spirv-opt optimization passes to FOREIGN and testing that foreign flags do not shadow unknown flags turns test_docs_cli_flags.py green on current main (5/5 pass).
|
Verified commit AI-assisted verification. |
|
Tested c76049c on Arch Linux, Python 3.14.10, CPU only: pass — first Linux check. tests/test_docs_cli_flags.py 5/5 OK (incl. new foreign-flag test). Negative control: base test+docs → exactly the 7 spirv-opt flags listed as unknown (the red this PR fixes); restored, green again. No game files. AI-assisted. |
|
Tested c76049c on Arch Linux, Python 3.14.10, CPU only: pass — first Linux check. tests/test_docs_cli_flags.py 5/5 OK (incl. new foreign-flag test). Negative control: base module + new test → exactly the new test fails; restored, green again. No game files. AI-assisted. |
Item: EGEN-DOCSCLI-SPIRVOPT
What and why
tests/test_docs_cli_flags.pyis red onmain(dde82f27e):unknown_flags()reports seven flags quoted indocs/embedded_shaders.md(lines 372-377) that no tracked source file mentions. They arespirv-optpasses and onelocal SSA probe pass from a single measurement, not options of any tool in this repository, so the page is right and
the check's allow list was missing them.
tests/test_docs_cli_flags.py: the seven names go intoFOREIGN, next to thegh,pipand argparse flags italready carries, and the comment says where they come from.
docs/embedded_shaders.md: the-Os,--merge-returnand--scalar-replacementsentence now namesspirv-opt,as the earlier flags on that line already do.
Test (before / after)
Before, on
upstream/maindde82f27e:After, on this branch:
Negative control:
test_a_foreign_flag_does_not_hide_an_unknown_oneexpects only--not-a-flagon a line that alsocarries
--merge-return. Run against the pre-fix module (git show dde82f27e:tests/test_docs_cli_flags.py) itreports both flags; on this branch it reports only the unknown one.
CPU-only, standard library, no GPU needed, no game files.
python -I scripts/check_no_game_data.pyis clean on bothchanged files.
Notes
FOREIGNset over a new per-page exception: that is already how other programs' flags areexcused, and it stays narrower than exempting the whole page.
AI-assisted.