test: run the device-filter tools through wine on a non-Windows host (#1150) #1219
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1219"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by robot00f on 2026-11-24T20:30:01Z.
Claim: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7143617202 (ID
VK-DEVICE-FILTER-WINE; from #1150)vk_device_filter_toolsruns a host Python that startedvk_descriptor_bench.exedirectly, so a ctest run on Linux gotOSError: [Errno 8] Exec format error(PierreEbele, #1150) -- a runner bug, not a tool bug: the tools are right to be Windows executables, and the test passes natively here.Change
runtime/test/check_device_filter_tools.py: onelauncher()picks the prefix a tool runs with --[]on Windows and for a non-PE,winewhen the target starts withMZon any other host, withLEONIDA_WINEnaming another loader. It is applied to both tools, not only the one that lists devices. When the host is not Windows and the loader is not onPATH, the script exits 77 withSKIP: ... <loader> is not on PATHinstead of reporting the Exec format error as a failure. Native Windows is unchanged.tests/test_check_device_filter_tools.pycovers the choice itself (Windows direct, PE through wine, non-PE direct, no loader still names one, the override, a missing tool, and the 77 path throughmain), so the branch runs on Windows CI where wine is absent.Tested
ok: vk_descriptor_bench refuses .../ok: vk_sandbox refuses ..., exit 0 -- unchanged from before.python -I tests/test_check_device_filter_tools.py-> OK (7 tests);compileall-> 0;check_no_game_data.py-> exit 0.Not run: a Wine host (none here). The launcher branch is covered by the unit test, not by a real Wine launch.
GPUs tested: NVIDIA GPU (Pascal class, 4 GB), driver 582.28, Windows 10 19045 for the native run.
AI-assisted: yes (OpenCode, DeepSeek V4.1 Flash)
Checklist
Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-25T05:32:45Z.
Review: COMMENTED
The Wine routing itself worked in an independent WSL run at
9a043734. All seven launcher unit tests passed. A synthetic executable wrapper also received all three calls in order: device listing, filtered benchmark, and filtered sandbox. The filter was cleared for enumeration and set for both probes.One gap remains in the documented Proton cross-build. The CTest registration launches host Python and does not forward
CMAKE_CROSSCOMPILING_EMULATOR. With the three arguments from that registration and no plainwineon PATH, the checker exited 77 while a working custom loader was available at a separate path. Passing that same loader throughLEONIDA_WINEmade it exit 0. The documented Proton setup configures the CMake emulator.Could the test pass the configured emulator and its arguments through to the checker? #1086 has a
--runnerpattern for this test. Autodetection can still serve direct invocations.AI-assisted. Synthetic executables and launcher, CPU only.
Imported from ubiquitarianism/leonida. Originally posted by PierreEbele on 2026-11-25T06:36:34Z.
Tested
9a043734aunder Wine 10.0 on Linux, GTX 1050 Ti (NVIDIA 555.58), against the real Windows cross-build tools (clang-cl + xwin)vk_descriptor_bench.exeandvk_sandbox.exe:main'scheck_device_filter_tools.py: exit 1,OSError: [Errno 8] Exec format errorLEONIDA_VK_DEVICE=leonida-no-such-gpu(exit 1), as TEST-1141 expectspython3 -I tests/test_check_device_filter_tools.py: OKI had opened #1618 for the same fix without seeing this one; closing it in favour of this PR. AI-assisted.
Recommendation: Merge
Imported from ubiquitarianism/leonida. Originally posted by Tauwni on 2026-11-26T15:37:23Z.
Tested on a Mac: Apple M3, macOS 26.5.1, with Wine 11.0 (the WineHQ macOS build, x86-64 under Rosetta, with its bundled MoltenVK 1.4.1).
mainfbf100b1bwas cross-built with clang-cl/lld-link 23.1.6 and xwin's SDK 10.0.26100.mainthe test fails the same way as on Linux:OSError: [Errno 8] Exec format error: .../vk_descriptor_bench.exe. macOS has no binfmt, so the.exenever starts.wineand refuse the filter (exit 1, and they printLEONIDA_VK_DEVICE=leonida-no-such-gpu: no Vulkan physical device matches). The script still reports FAIL for both, though, because of the"device:" in outcheck. Wine's MoltenVK logs at info level by default, and every instance prints[mvk-info] GPU device:, so the test reads that as the tool having chosen a GPU.The tools print their own pick at the start of a line (
device: %s (...), as invk_descriptor_bench.cpp), so anchoring the check fixes it. With this one line changed, both reportokand the script exits 0:The unchanged script also passes with
MVK_CONFIG_LOG_LEVEL=1, but the anchored match doesn't depend on the driver's logging.tests/test_check_device_filter_tools.pypasses on this branch.#1086 carries the same
"device:" in outcheck in its version of the script.AI-assisted (Claude Code). No game data.
Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T09:38:41Z.
Red/green: tests/test_check_device_filter_tools.py fails on main (1 failed) and passes with this PR (7 passed).
Runtime batch of 20 PRs tested by OreoFR (full build, ctest without the game, Python suite, translator): same results as main
09c153948, RTX 4070 Laptop / Windows 11.AI-assisted (Claude Code, Claude Opus 5.5)
Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-28T21:47:48Z.
Verified by OreoFR
09c153948+ PR head9a043734a; integration package 1 of 6 (20 PRs, merged without conflict)AI-assisted (Claude Code, Claude Opus 5.5).