[PR #776] [MERGED] native_pso_hashes: exit 0 on --help (test_tool_startup red on main since #497) #814

Closed
opened 2026-11-26 20:19:08 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/776
Author: @Boost9898
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @ubiquitarianism

Base: main ← Head: fix/native-pso-hashes-help


📝 Commits (1)

  • 116de82 native_pso_hashes: exit 0 on --help

📊 Changes

2 files changed (+12 additions, -0 deletions)

View changed files

📝 tests/test_native_pso_hashes.py (+9 -0)
📝 tools/native_pso_hashes.py (+3 -0)

📄 Description

Claimed in the coordination issue as: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7133124413

What and why

#497 (1740e093c) added tools/native_pso_hashes.py, which imports its sibling shader_carve. tests/test_tool_startup.py derives its list from such imports and runs each tool with --help. This one took --help as a wrong argument count, printed the usage and exited 2, so test_each_sibling_importing_tool_starts fails on main 647affe2a (tool='native_pso_hashes').

main() now treats -h/--help like tools/mesh_compute_vs.py does: it prints the docstring to stdout and returns 0. A wrong argument count still returns 2. A unit test in tests/test_native_pso_hashes.py covers 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 on main 647affe2a. 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 does test_tool_startup.py.
  • python -m compileall, git diff --check and scripts/check_no_game_data.py on the changed files: clean.

GPUs tested: n/a (no GPU tests involved)

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a: no translator rule changes)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/776 **Author:** [@Boost9898](https://github.com/Boost9898) **Created:** 11/24/2026 **Status:** ✅ Merged **Merged:** 11/24/2026 **Merged by:** [@ubiquitarianism](https://github.com/ubiquitarianism) **Base:** `main` ← **Head:** `fix/native-pso-hashes-help` --- ### 📝 Commits (1) - [`116de82`](https://github.com/ubiquitarianism/leonida/commit/116de82f6ddaa226cf942da17749345c5e5dc87d) native_pso_hashes: exit 0 on --help ### 📊 Changes **2 files changed** (+12 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `tests/test_native_pso_hashes.py` (+9 -0) 📝 `tools/native_pso_hashes.py` (+3 -0) </details> ### 📄 Description Claimed in the coordination issue as: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7133124413 ### What and why #497 (`1740e093c`) added `tools/native_pso_hashes.py`, which imports its sibling `shader_carve`. `tests/test_tool_startup.py` derives its list from such imports and runs each tool with `--help`. This one took `--help` as a wrong argument count, printed the usage and exited 2, so `test_each_sibling_importing_tool_starts` fails on `main` `647affe2a` (`tool='native_pso_hashes'`). `main()` now treats `-h`/`--help` like `tools/mesh_compute_vs.py` does: it prints the docstring to stdout and returns 0. A wrong argument count still returns 2. A unit test in `tests/test_native_pso_hashes.py` covers 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 on `main` `647affe2a`. 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 does `test_tool_startup.py`. - `python -m compileall`, `git diff --check` and `scripts/check_no_game_data.py` on the changed files: clean. GPUs tested: n/a (no GPU tests involved) AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a: no translator rule changes) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:19:08 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
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.

Dependencies

No dependencies set

Reference
starred/leonida#814
No description provided.