Loader tests: build the probe fixture under CARGO_TARGET_TMPDIR #666

Manually merged
github merged 1 commit from gh-pr/666/head into gh-pr/666/base 2026-11-26 04:12:09 +00:00
Owner

@⁠lameloball2813-ui on GitHub · 2026-11-24 06:24 UTC · original
lameloball2813-ui:fix/load-probe-target-dir → main · +5 −4 · 1 files · 1 commits · merged 2026-11-24 08:20 UTC

load_probe builds tests/fixtures/hle-probe with --target-dir <workspace>/target/fixtures, a path fixed inside the checkout. It ignores CARGO_TARGET_DIR, so the fixture lands in the checkout even when the rest of the build is redirected.

That matters on Windows when the checkout's path is long. The fixture's build-script executables under target/fixtures/debug/build/... go past MAX_PATH, link.exe fails with LNK1104, and loads_binds_and_calls_probe fails with "building hle-probe failed". Pointing CARGO_TARGET_DIR at a short folder fixes every other crate but not this test.

The fixture now builds into CARGO_TARGET_TMPDIR (the folder cargo gives integration tests inside the outer target dir) under hle-probe. It is still its own target dir, so the outer build's lock is not an issue, and it follows CARGO_TARGET_DIR like the rest of the build.

Testing

Windows 11, a checkout with a long path, CARGO_TARGET_DIR set to a short folder:

  • Before: cargo test -p victory-loader --test load_probe fails with LNK1104 and "building hle-probe failed", and target/fixtures is created in the checkout.
  • After: both tests pass; the fixture is built at $CARGO_TARGET_DIR/tmp/hle-probe/debug/hle_probe.dll, and nothing is written to the checkout.

Without CARGO_TARGET_DIR the fixture moves from target/fixtures to target/tmp/hle-probe, still under the ignored target/. Nothing else in the tree refers to target/fixtures. rustfmt, clippy and cargo xtask policy are clean.

**@⁠lameloball2813-ui** on GitHub · 2026-11-24 06:24 UTC · [original](https://github.com/Marvisak/VIctory/pull/666) `lameloball2813-ui:fix/load-probe-target-dir` → `main` · +5 −4 · 1 files · 1 commits · merged 2026-11-24 08:20 UTC `load_probe` builds `tests/fixtures/hle-probe` with `--target-dir <workspace>/target/fixtures`, a path fixed inside the checkout. It ignores `CARGO_TARGET_DIR`, so the fixture lands in the checkout even when the rest of the build is redirected. That matters on Windows when the checkout's path is long. The fixture's build-script executables under `target/fixtures/debug/build/...` go past MAX_PATH, `link.exe` fails with LNK1104, and `loads_binds_and_calls_probe` fails with "building hle-probe failed". Pointing `CARGO_TARGET_DIR` at a short folder fixes every other crate but not this test. The fixture now builds into `CARGO_TARGET_TMPDIR` (the folder cargo gives integration tests inside the outer target dir) under `hle-probe`. It is still its own target dir, so the outer build's lock is not an issue, and it follows `CARGO_TARGET_DIR` like the rest of the build. ## Testing Windows 11, a checkout with a long path, `CARGO_TARGET_DIR` set to a short folder: - Before: `cargo test -p victory-loader --test load_probe` fails with LNK1104 and "building hle-probe failed", and `target/fixtures` is created in the checkout. - After: both tests pass; the fixture is built at `$CARGO_TARGET_DIR/tmp/hle-probe/debug/hle_probe.dll`, and nothing is written to the checkout. Without `CARGO_TARGET_DIR` the fixture moves from `target/fixtures` to `target/tmp/hle-probe`, still under the ignored `target/`. Nothing else in the tree refers to `target/fixtures`. rustfmt, clippy and `cargo xtask policy` are clean.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:12:06 +00:00
github manually merged commit 764fa19373 into gh-pr/666/base 2026-11-26 04:12:09 +00:00
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!666
No description provided.