Repository navigation
Honor CTest fixture setup dependencies in the Wine runner - #4558
AGInformatique81 wants to merge 1 commit into
Conversation
|
Tested
AI-assisted (Devin). |
Kam471
left a comment
There was a problem hiding this comment.
Ran this at e7ac88ea on Windows 11: python -I tests/test_run_wine_tests.py -> 52 tests, OK (5 skipped); git diff --check clean.
The Wine runner now honors CTest fixture setup dependencies, so fixtures run before the tests that need them; the added cases pass. No blocking issue.
whattheflop
left a comment
There was a problem hiding this comment.
AI-assisted Windows CPU comparison at e7ac88ea and parent d0835dd9, uv CPython 3.12.13, CTest 4.4.5. I used actual ctest --show-only=json-v1 output from generated synthetic projects and a Python stand-in for Wine. The PR matches ctest -j1 in five fixture scenarios, including two setups with one failure, chained failure propagation, skipped/disabled setup, cleanup listed first, and plain DEPENDS after a failing consumer.
One ordinary ordering difference remains. List five tests as z, y, x, dep, w and give only dep a DEPENDS z property. CTest and the parent run z, y, x, dep, w. The PR runs z, y, x, w, dep because TopologicalSorter.static_order() drains its initial ready batch before considering the newly ready dep. All exits still match in this fixture. Selecting the earliest listed ready test after each completion would preserve the prior order here while honoring dependencies.
Flyander
left a comment
There was a problem hiding this comment.
The setup dependency edges are present, but cleanup fixtures are not ordered after their consumers.
| required = list(dict.fromkeys(setup for fixture in values.get("FIXTURES_REQUIRED", []) | ||
| for setup in setups_by_fixture.get(fixture, []))) | ||
| requirements.append(required) | ||
| depends = [dependency for name in values.get("DEPENDS", []) for dependency in indexes_by_name.get(name, [])] |
There was a problem hiding this comment.
[P2] The graph adds edges from setup to FIXTURES_REQUIRED consumers, but never from those consumers to tests marked FIXTURES_CLEANUP. With input order [cleanup, consumer, setup], static_order() can run cleanup before setup and consumer, deleting the fixture before its users. CTest guarantees cleanup runs after all tests requiring that fixture (https://cmake.org/cmake/help/latest/prop_test/FIXTURES_CLEANUP.html). The new test masks this by giving cleanup explicit DEPENDS on consumer and setup. Please model the consumer-to-cleanup edges and cover the unadorned fixture properties.
|
Tested
AI-assisted. |
The Wine runner used to execute the CTest JSON in list order and ignore fixture setup failures. For example, the XDXR checks consume files made by fixture setup tests. Launching a check after setup failed can inspect stale artifacts or report a second, misleading failure.
Order the listed tests by CTest's
DEPENDSedges and fixture setup requirements. Report a fixture consumer as failed without starting it when a setup test fails. Plain ordering dependencies still run after a failure, including cleanup tests. A cycle in the listing produces one error before launch.ctest --show-only=json-v1output and synthetic processes. The Wine runner had the same execution order as CTest 4.5.1 for a passing, failing, and skipped setup. Both runners ran cleanup after the failed setup without launching its consumer.python -I tests/test_run_wine_tests.py: 47 passed on Windows 11 / Python 3.15.2, with five POSIX-only skips. All 52 passed on WSL / Python 3.14.7. The new cases fail against the base.Claimed as a new TEST item in the coordination thread. This builds directly on main. AI-assisted with Codex.