Honor CTest fixture cleanup ordering in the Wine runner #1946

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

@⁠lgr123 on GitHub · 2026-11-25 16:25 UTC · original
lgr123:wine-fixture-cleanup → main · +68 −10 · 2 files · 1 commits · open

Claimed as WINE-RUNNER-FIXTURE-CLEANUP in #1608.

This is a fallback for listings that retain FIXTURES_* metadata but omit CTest’s generated DEPENDS edges. In that shape, an early-listed cleanup ran before setup and consumers with both --jobs 1 and --jobs 2. I haven’t identified a supported CTest version or a current CI producer that emits that shape. The standard ctest --show-only=json-v1 export already preserves those edges on CTest 3.24.3 and 4.3.1-msvc1, as reported in the independent review.

This patch adds teardown ordering edges without adding failed-setup gates to cleanup. A cleanup shared by two fixtures waits for both setups and all consumers, then runs once. The regressions cover serial and parallel execution, failed setup, failed consumer and skipped setup.

Tested

  • Windows, Python 3.12.14, CPU-only synthetic subprocesses. All 8 tests in tests/test_run_wine_test_fixtures.py passed after rebasing onto 9e7720c.
  • The broader Windows runner suite has pre-existing shared-trace errors in two concurrency tests. I reproduced both on pristine public main in repeated runs. The new tests write one trace file per child.
  • git diff --check and the source-only policy check passed. No game files were used.

GPUs tested: n/a.

AI-assisted: yes.

**@⁠lgr123** on GitHub · 2026-11-25 16:25 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1946) `lgr123:wine-fixture-cleanup` → `main` · +68 −10 · 2 files · 1 commits · open Claimed as `WINE-RUNNER-FIXTURE-CLEANUP` in [#1608](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/1608). This is a fallback for listings that retain `FIXTURES_*` metadata but omit CTest’s generated `DEPENDS` edges. In that shape, an early-listed cleanup ran before setup and consumers with both `--jobs 1` and `--jobs 2`. I haven’t identified a supported CTest version or a current CI producer that emits that shape. The standard `ctest --show-only=json-v1` export already preserves those edges on CTest 3.24.3 and 4.3.1-msvc1, as reported in the independent review. This patch adds teardown ordering edges without adding failed-setup gates to cleanup. A cleanup shared by two fixtures waits for both setups and all consumers, then runs once. The regressions cover serial and parallel execution, failed setup, failed consumer and skipped setup. ### Tested - Windows, Python 3.12.14, CPU-only synthetic subprocesses. All 8 tests in `tests/test_run_wine_test_fixtures.py` passed after rebasing onto `9e7720c`. - The broader Windows runner suite has pre-existing shared-trace errors in two concurrency tests. I reproduced both on pristine public main in repeated runs. The new tests write one trace file per child. - `git diff --check` and the source-only policy check passed. No game files were used. GPUs tested: n/a. AI-assisted: yes.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:12:19 +00:00
Author
Owner

@⁠alexandersato0830 on GitHub · 2026-11-25 16:40 UTC · original · reviewed

I independently checked the Wine runner at 4d0536490. All eight tests in tests/test_run_wine_test_fixtures.py passed on Windows 11 with Python 3.11.17.

I also compared a nested fixture against native CTest. The inner setup and cleanup require an outer fixture, and the inner fixture has two consumers, one deliberately slow. I ran the success, failed consumer, failed inner setup, skipped inner setup, and failed outer setup cases with one and three workers.

  • CTest 3.24.3 and 4.3.1-msvc1 both emit the fixture edges in ctest --show-only=json-v1, the same command the runtime workflow uses. For example, inner_cleanup already has DEPENDS entries for outer_setup, inner_setup, and both consumers. With all JSON properties intact, both 9e7720c9e and 4d0536490 matched native CTest's launch set and required ordering in all ten cases per version.
  • With only the generated DEPENDS properties removed, the base runner got cleanup ordering wrong in all ten cases per version. The proposed runner still matched native CTest. The test commands were adapted to launch synthetic Python stand-ins.

Could the PR description call out that this fixes listings without the generated DEPENDS edges? If a CTest version or another producer emits that shape in practice, naming it would help establish which runs are affected.

AI-assisted review with Codex. CPU-only synthetic tests. No game files used.

**@⁠alexandersato0830** on GitHub · 2026-11-25 16:40 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1946#pullrequestreview-6061350449) · **reviewed** I independently checked the Wine runner at `4d0536490`. All eight tests in `tests/test_run_wine_test_fixtures.py` passed on Windows 11 with Python 3.11.17. I also compared a nested fixture against native CTest. The inner setup and cleanup require an outer fixture, and the inner fixture has two consumers, one deliberately slow. I ran the success, failed consumer, failed inner setup, skipped inner setup, and failed outer setup cases with one and three workers. - CTest 3.24.3 and 4.3.1-msvc1 both emit the fixture edges in `ctest --show-only=json-v1`, the same command the runtime workflow uses. For example, `inner_cleanup` already has `DEPENDS` entries for `outer_setup`, `inner_setup`, and both consumers. With all JSON properties intact, both `9e7720c9e` and `4d0536490` matched native CTest's launch set and required ordering in all ten cases per version. - With only the generated `DEPENDS` properties removed, the base runner got cleanup ordering wrong in all ten cases per version. The proposed runner still matched native CTest. The test commands were adapted to launch synthetic Python stand-ins. Could the PR description call out that this fixes listings without the generated `DEPENDS` edges? If a CTest version or another producer emits that shape in practice, naming it would help establish which runs are affected. AI-assisted review with Codex. CPU-only synthetic tests. No game files used.
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/1946/head:github-bot/gh-1946'
git switch 'github-bot/gh-1946'

Merge

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