tests: compare the Wine launcher's physical paths with realpath #9

Manually merged
github merged 1 commit from gh-pr/9/head into gh-pr/9/base 2026-11-26 08:40:10 +00:00
Owner

@⁠wavehs on GitHub · 2026-11-24 01:31 UTC · original
wavehs:test-platform-realpath → main · +9 −3 · 1 files · 1 commits · merged 2026-11-24 01:40 UTC

Claimed in the coordination issue as: none — the original project's coordination issue was lost with its repository, and this repository has no such issue yet. No open pull request touches tests/test_make_game_platform.py.

Depends on: none.

What and why

test_wine_first_boot_uses_the_packaged_game_and_shader_paths runs the generated POSIX launcher and compares the paths the runtime sees. The launcher resolves its own path with readlink -f and lets cd settle the game directory, so the runtime gets the physical path: on macOS the temporary directory is /var/folders/..., a symlink to /private/var/folders/..., and three assertions failed on this host:

AssertionError: Lists differ: ['/private/var/folders/...'] != ['/var/folders/...']

The expectations are now os.path.realpath'd, which is a no-op on Linux and Windows; the test still checks the same values.

Tested

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

tree tests/test_make_game_platform.py
main@30daa6958 FAILED (failures=3) — the --dry-run/--init path list, self.root, and the moved-port LEONIDA_SHADERS path
this commit Ran 46 tests ... OK

compileall clean, check_no_game_data.py clean. Not run: Windows, Linux, any GPU or game data.

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: no translator change.)
**@⁠wavehs** on GitHub · 2026-11-24 01:31 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/9) `wavehs:test-platform-realpath` → `main` · +9 −3 · 1 files · 1 commits · merged 2026-11-24 01:40 UTC Claimed in the coordination issue as: none — the original project's coordination issue was lost with its repository, and this repository has no such issue yet. No open pull request touches `tests/test_make_game_platform.py`. Depends on: none. ### What and why `test_wine_first_boot_uses_the_packaged_game_and_shader_paths` runs the generated POSIX launcher and compares the paths the runtime sees. The launcher resolves its own path with `readlink -f` and lets `cd` settle the game directory, so the runtime gets the physical path: on macOS the temporary directory is `/var/folders/...`, a symlink to `/private/var/folders/...`, and three assertions failed on this host: ``` AssertionError: Lists differ: ['/private/var/folders/...'] != ['/var/folders/...'] ``` The expectations are now `os.path.realpath`'d, which is a no-op on Linux and Windows; the test still checks the same values. ### Tested `main@30daa6958`, macOS 15 arm64 (Apple M3 Pro), CPython 3.15.2, CPU only, no game files: | tree | `tests/test_make_game_platform.py` | |---|---| | `main@30daa6958` | `FAILED (failures=3)` — the `--dry-run`/`--init` path list, `self.root`, and the moved-port `LEONIDA_SHADERS` path | | this commit | `Ran 46 tests ... OK` | `compileall` clean, `check_no_game_data.py` clean. Not run: Windows, Linux, any GPU or game data. 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: no translator change.)
test_wine_first_boot_uses_the_packaged_game_and_shader_paths runs on
POSIX only and three assertions failed on macOS: gta6rt.sh resolves its
own path with readlink -f and lets cd settle the game directory, so the
runtime sees /private/var/... while the test expected /var/... (macOS
keeps the temporary directory behind a symlink). The expectations are
now realpath'd, which is a no-op on Linux and on Windows.

(cherry picked from commit 93f77743581ec6ca2a41c4ccadfcf68033f12bfd)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 08:40:09 +00:00
github manually merged commit 28c5b70b1b into gh-pr/9/base 2026-11-26 08:40:10 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.