test: run the device-filter tools through wine on a non-Windows host (#1150) #1219
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!1219
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/device-filter-wine"
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?
Pull request successfully merged and closed
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
Tested 9a043734a under 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
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.
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)
Verified by OreoFR
09c153948+ PR head9a043734a; integration package 1 of 6 (20 PRs, merged without conflict)AI-assisted (Claude Code, Claude Opus 5.5).