native_pso_hashes: exit 0 on --help (test_tool_startup red on main since #497) #776
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/776"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by Boost9898 on 2026-11-24T13:41:32Z.
Claimed in the coordination issue as: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7133124413
What and why
#497 (
1740e093c) addedtools/native_pso_hashes.py, which imports its siblingshader_carve.tests/test_tool_startup.pyderives its list from such imports and runs each tool with--help. This one took--helpas a wrong argument count, printed the usage and exited 2, sotest_each_sibling_importing_tool_startsfails onmain647affe2a(tool='native_pso_hashes').main()now treats-h/--helpliketools/mesh_compute_vs.pydoes: it prints the docstring to stdout and returns 0. A wrong argument count still returns 2. A unit test intests/test_native_pso_hashes.pycovers both flags.Tested
Apple M4, macOS 26.5.1, Python 3.14.8 and 3.12.10, CPU only, no game files.
tests/test_tool_startup.py: fails onmain647affe2a. With this change, OK on both versions.tests/test_native_pso_hashes.py(with the new test): OK on both versions. Negative control: without the change to the tool, the new test fails and so doestest_tool_startup.py.python -m compileall,git diff --checkandscripts/check_no_game_data.pyon the changed files: clean.GPUs tested: n/a (no GPU tests involved)
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator rule changes)Imported from ubiquitarianism/leonida. Originally posted by KernelSmoker on 2026-11-24T13:43:15Z.
Review: COMMENTED
Independent Linux verification of PR head
116de82f6ddaa226cf942da17749345c5e5dc87don current base47c6511747c93aa3fb908d7782ca96173d0eead3:tests/test_native_pso_hashes.pypassed 9/9 andtests/test_tool_startup.pypassed 2/2, including the previously failing sibling-startup case. Directpython3 -I tools/native_pso_hashes.py --helpexited successfully and displayed the expected usage;git diff --checkpassed. Synthetic fixtures only, no game data or GPU. At the latest hosted-check refresh, all reported checks were still queued. AI-assisted independent verification.