tests: give the mod manager the launcher its platform looks for #86

Closed
github-bot wants to merge 1 commit from gh-pr/86/head into gh-pr/86/base
Owner

@⁠wavehs on GitHub · 2026-11-24 02:15 UTC · original
wavehs:tests-win-mods-launcher → main · +3 −0 · 1 files · 1 commits · closed without merging

Claimed in the coordination issue as: none — the original project's coordination issue was lost with its repository, and this repository's issue index (#18) has no entry for it. No open pull request touches this file.

Depends on: none.

What and why

tools/leonida_mods.py:493 picks the runtime launcher by platform — ("gta6rt.exe",) on Windows, ("gta6rt.sh", "gta6rt.exe") everywhere else — and test_run_print_builds_gta6rt_command wrote only gta6rt.sh. On the Windows runner run --dry-run --print therefore exited 2 with

ERROR: C:\Users\RUNNER~1\...\port has no gta6rt executable; build the runtime stage first

instead of printing the command, and the test failed on its (code, err) == (0, "") assertion (the check job on 9ec34cdff).

The fixture now writes both launchers. POSIX still finds the .sh first, so what the test checks is unchanged.

Tested

macOS 15 arm64 (Apple M3 Pro), CPython 3.15.2, CPU only, no game files:

tree tests/test_leonida_mods.py
main@9ec34cdff OK (POSIX: the .sh is found)
this commit OK

The Windows shape is reproduced by calling runtime_executable() on a port that holds only gta6rt.sh with os.name set to "nt": it raises ModsError: ... has no gta6rt executable; build the runtime stage first, the CI message; with gta6rt.exe added it returns that file. Not run on Windows itself.

compileall clean, check_no_game_data.py clean.

AI-assisted: yes.

Checklist

  • 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. (Not applicable: test-only.)
**@⁠wavehs** on GitHub · 2026-11-24 02:15 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/86) `wavehs:tests-win-mods-launcher` → `main` · +3 −0 · 1 files · 1 commits · closed without merging Claimed in the coordination issue as: none — the original project's coordination issue was lost with its repository, and this repository's issue index (#18) has no entry for it. No open pull request touches this file. Depends on: none. ### What and why `tools/leonida_mods.py:493` picks the runtime launcher by platform — `("gta6rt.exe",)` on Windows, `("gta6rt.sh", "gta6rt.exe")` everywhere else — and `test_run_print_builds_gta6rt_command` wrote only `gta6rt.sh`. On the Windows runner `run --dry-run --print` therefore exited 2 with ``` ERROR: C:\Users\RUNNER~1\...\port has no gta6rt executable; build the runtime stage first ``` instead of printing the command, and the test failed on its `(code, err) == (0, "")` assertion (the `check` job on `9ec34cdff`). The fixture now writes both launchers. POSIX still finds the `.sh` first, so what the test checks is unchanged. ### Tested macOS 15 arm64 (Apple M3 Pro), CPython 3.15.2, CPU only, no game files: | tree | `tests/test_leonida_mods.py` | |---|---| | `main@9ec34cdff` | `OK` (POSIX: the `.sh` is found) | | this commit | `OK` | The Windows shape is reproduced by calling `runtime_executable()` on a port that holds only `gta6rt.sh` with `os.name` set to `"nt"`: it raises `ModsError: ... has no gta6rt executable; build the runtime stage first`, the CI message; with `gta6rt.exe` added it returns that file. Not run on Windows itself. `compileall` clean, `check_no_game_data.py` clean. AI-assisted: yes. ### Checklist - [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. (Not applicable: test-only.)
runtime_executable() looks for gta6rt.exe only on Windows, and the test only
wrote gta6rt.sh, so 'run --dry-run --print' failed there with "port has no
gta6rt executable; build the runtime stage first" instead of printing the
command. Write both launchers; POSIX still picks the .sh.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 08:43:50 +00:00
github-bot closed this pull request 2026-11-26 08:43:50 +00:00
Author
Owner

@⁠wavehs on GitHub · 2026-11-24 02:26 UTC · original

Duplicate of #119: old PR 9853 (old-pr/9853, lordon1a) is the same change to tests/test_leonida_mods.py and is already open as #119. Closing this one so there is a single pull request for it.

**@⁠wavehs** on GitHub · 2026-11-24 02:26 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/86#issuecomment-7120153282) Duplicate of #119: old PR 9853 (`old-pr/9853`, lordon1a) is the same change to `tests/test_leonida_mods.py` and is already open as #119. Closing this one so there is a single pull request for it.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.