Loader: VICTORY_HLE_PROBE names a prebuilt hle-probe fixture #3268
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3270"
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 Marvisak/VIctory. Originally posted by neonbyte1 on 2026-11-26T15:14:35Z.
Split out of #1218, as the maintainer triage asked, so that PR stays about the Wine test runner.
crates/victory-loader/tests/load_probe.rsbuilds thetests/fixtures/hle-probefixture by runningcargofrom inside the test. Under Wine, the test process can't start the host'scargo, which isn't a Windows executable. With this change,VICTORY_HLE_PROBE, when set, names an already-builthle_probe.dll, and the test uses it directly. When it's unset, nothing changes.One commit, one file; no fixture, runner or docs changes.
Tested under Wine (vkd3d-proton, Linux, RTX 5090) with the fixture cross-built on the host:
loads_binds_and_calls_probeandmaps_a_title_dll_the_title_loads_itselfpass. Windows-target clippy (with and without--all-features) andcargo xtask policypass. Not run on native Windows, where the variable is unset and the test path is the one onmain.AI-assisted (Claude); measured on my machine, no game data shared.
Imported from Marvisak/VIctory. Originally posted by Dukestar69 on 2026-11-26T15:28:15Z.
Review: APPROVED
Reviewed the diff and verified locally on Windows 11 x64:
VICTORY_HLE_PROBEto point to a prebuilthle-probefixture cleanly avoids nestedcargoinvocations in environments like Wine while keeping the default build path unchanged.cargo test -p victory-loader --test load_probe -- --test-threads=1: 2 passed, 0 failed.cargo clippy -p victory-loader --all-targets -- -D warnings: clean.cargo xtask policy: 191 files ok.Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
Imported from Marvisak/VIctory. Originally posted by Jackster on 2026-11-26T22:55:30Z.
Windows 11,
63bcca4+ this PR:cargo test -p victory-loader --test load_probe: 2 passed (0.31 s), which is the default path (the test builds the fixture itself).target/tmp/hle-probe), kept a copy of the builthle_probe.dll, setVICTORY_HLE_PROBEto it and re-ran: 2 passed in 0.09 s and the fixture build tree was not recreated. So the override really does skip the innercargo, which is the case this adds for Wine runners.cargo clippy -p victory-loader --all-targets -- -D warnings: clean.Synthetic only. AI-assisted.
Imported from Marvisak/VIctory. Originally posted by neonbyte1 on 2026-11-26T23:00:52Z.
@Jackster thanks for checking both paths. Removing the fixture's build tree and confirming it isn't recreated with
VICTORY_HLE_PROBEset is exactly the case this is for.AI-assisted (Claude); no game data shared.
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-27T01:11:10Z.
Review: APPROVED
Looks good. Clean and minimal way to reuse a prebuilt
hle_probe.dllin environments where running nestedcargoisn't possible.Verified:
cargo xtask policyandcargo clippy --tests -p victory-loader -- -D warningspass cleanly.cargo test --locked -p victory-loader --test load_probepasses (2/2) both withVICTORY_HLE_PROBEunset (builds fixture) and withVICTORY_HLE_PROBEpointing to the prebuilthle_probe.dll(skips nested cargo build).(Minor optional note): on Unix/Wine runners where an empty env var (
VICTORY_HLE_PROBE=) can exist,.filter(|p| !p.is_empty())would fall back to building rather than returning an emptyPathBuf.Imported from Marvisak/VIctory. Originally posted by neonbyte1 on 2026-11-27T01:17:18Z.
@fuzeofficlal thanks for the review. Took the optional note in
711b2d5c:VICTORY_HLE_PROBEset but empty now falls back to building the fixture (.filter(|p| !p.is_empty())), and the doc comment says so. Clippy (--tests, Windows target,-D warnings) and rustfmt are clean. The tests are Windows-only, so on Linux this is compile-checked; the empty-variable path itself is the usual nested-cargo build, which only a native Windows run exercises.AI-assisted (Claude); no game data shared.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.