run_wine_session: initialize and stop the prefix with $WINE (OLD-9952) #1241

Open
github-bot wants to merge 1 commit from github-bot/gh-1241 into main AGit
Owner

@⁠IlyassRS3 on GitHub · 2026-11-24 20:43 UTC · original
IlyassRS3:carry/old-9952-run-wine-session → main · +94 −3 · 3 files · 1 commits · open

What changed

Carries forward old-pr/9952 (draft #221, original commit by @⁠SkippySteve) rebased cleanly onto current main (2e026b03e), preserving the original author commit.

  • scripts/run_wine_session.sh: resolve $WINE (default wine) via command -v (reporting missing Wine with exit status 127), run "$wine_path" wineboot --init instead of bare wineboot, and shut down the prefix with $WINESERVER, else the sibling wineserver next to $wine_path, else wineserver on PATH.
  • docs/testing.md: document $WINE / sibling wineserver / $WINESERVER prefix handling for Proton and UMU-Proton builds without a system Wine.
  • tests/test_run_wine_session.py: add 4 unit tests covering Proton $WINE + sibling wineserver, default wine on PATH, $WINESERVER override + PATH fallback, and missing $WINE exit 127 reporting.

Item ID

  • Coordination issue #14 item: OLD-9952 (carries forward old-pr/9952 / draft #221, #17)
  • Depends on: none

Verification

Tested on macOS 27.2.1 (Apple M5 arm64), Python 3.14, bash + /usr/bin/timeout (no game files, no GPU, standard library only):

  • TMPDIR=/var/tmp python3 -I tests/test_run_wine_session.py -v -> 4/4 OK
  • Revert-source mutation check (reverting scripts/run_wine_session.sh to upstream/main while keeping tests/test_run_wine_session.py) -> FAILED (failures=4) (all 4 tests fail); restoring the fix returns to 4/4 OK.
  • All 12 tests/test_docs_*.py suites -> all OK
  • python3 -I tests/test_ci_registration.py -> 15/15 OK (new test file selected by CI stdlib loop)
  • python3 -I tests/test_text_write_line_endings.py -> 3/3 OK
  • python3 -m compileall -q tests/test_run_wine_session.py -> OK
  • python3 -I scripts/check_no_game_data.py docs/testing.md scripts/run_wine_session.sh tests/test_run_wine_session.py -> OK

Checklist

  • No game files, binaries, shaders, textures, audio, or logs quoting them
  • No keys, decryption, or online services
  • Claimed in the coordination issue (#14) before opening this PR
  • AI-assisted: yes (carried forward, audited, rebased, and regression-verified with AI assistance; original commit by @⁠SkippySteve preserved)
**@⁠IlyassRS3** on GitHub · 2026-11-24 20:43 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1241) `IlyassRS3:carry/old-9952-run-wine-session` → `main` · +94 −3 · 3 files · 1 commits · open ## What changed Carries forward `old-pr/9952` (draft #221, original commit by @⁠SkippySteve) rebased cleanly onto current `main` (`2e026b03e`), preserving the original author commit. - `scripts/run_wine_session.sh`: resolve `$WINE` (default `wine`) via `command -v` (reporting missing Wine with exit status 127), run `"$wine_path" wineboot --init` instead of bare `wineboot`, and shut down the prefix with `$WINESERVER`, else the sibling `wineserver` next to `$wine_path`, else `wineserver` on `PATH`. - `docs/testing.md`: document `$WINE` / sibling `wineserver` / `$WINESERVER` prefix handling for Proton and UMU-Proton builds without a system Wine. - `tests/test_run_wine_session.py`: add 4 unit tests covering Proton `$WINE` + sibling `wineserver`, default `wine` on `PATH`, `$WINESERVER` override + `PATH` fallback, and missing `$WINE` exit 127 reporting. ## Item ID - Coordination issue #14 item: `OLD-9952` (carries forward `old-pr/9952` / draft #221, #17) - Depends on: none ## Verification Tested on macOS 27.2.1 (Apple M5 arm64), Python 3.14, bash + `/usr/bin/timeout` (no game files, no GPU, standard library only): - `TMPDIR=/var/tmp python3 -I tests/test_run_wine_session.py -v` -> **4/4 OK** - Revert-source mutation check (reverting `scripts/run_wine_session.sh` to `upstream/main` while keeping `tests/test_run_wine_session.py`) -> **FAILED (failures=4)** (all 4 tests fail); restoring the fix returns to **4/4 OK**. - All 12 `tests/test_docs_*.py` suites -> **all OK** - `python3 -I tests/test_ci_registration.py` -> **15/15 OK** (new test file selected by CI stdlib loop) - `python3 -I tests/test_text_write_line_endings.py` -> **3/3 OK** - `python3 -m compileall -q tests/test_run_wine_session.py` -> OK - `python3 -I scripts/check_no_game_data.py docs/testing.md scripts/run_wine_session.sh tests/test_run_wine_session.py` -> OK ## Checklist - [x] No game files, binaries, shaders, textures, audio, or logs quoting them - [x] No keys, decryption, or online services - [x] Claimed in the coordination issue (#14) before opening this PR - [x] AI-assisted: yes (carried forward, audited, rebased, and regression-verified with AI assistance; original commit by @⁠SkippySteve preserved)
The session script ran wineboot and wineserver from PATH while
run_wine_tests.py runs the tests with $WINE. With WINE set to Proton's or
UMU-Proton's files/bin/wine, the prefix was initialized by another Wine, or
the script stopped at 'wineboot: command not found' on a host without a
system Wine, and the exit trap stopped the wrong wineserver.

Run "$WINE" wineboot --init and stop $WINESERVER, else the wineserver next
to $WINE, else wineserver on PATH; report a missing $WINE with status 127.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:44:11 +00:00
Author
Owner

@⁠copilot-pull-request-reviewer[bot] on GitHub · 2026-11-24 20:43 UTC · original · reviewed

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

**@⁠copilot-pull-request-reviewer[bot]** on GitHub · 2026-11-24 20:43 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1241#pullrequestreview-6047092254) · **reviewed** Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1241/head:github-bot/gh-1241'
git switch 'github-bot/gh-1241'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1241'
git switch 'github-bot/gh-1241'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1241'
git switch 'github-bot/gh-1241'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1241'
git switch 'main'
git merge --squash 'github-bot/gh-1241'
git switch 'main'
git merge --ff-only 'github-bot/gh-1241'
git switch 'main'
git merge 'github-bot/gh-1241'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.