Build: make workspace tests run on Linux #39

Closed
github-bot wants to merge 1 commit from gh-pr/39/head into gh-pr/39/base
Owner

@⁠LaunchDoesntCode on GitHub · 2026-11-23 23:37 UTC · original
fix/linux-portable-tests → main · +84 −36 · 9 files · 1 commits · closed without merging

Summary

Make cargo test --workspace --locked run on Linux while keeping the title runtime and GPU implementation Windows-targeted.

  • Gate Windows-only GPU, HLE, dialog, and shader-translation entry points.
  • Make path and storage tests account for the host platform.
  • Keep tests that parse their own test executable as a PE image on Windows, where that fixture assumption holds.

This supports Linux contributors who build the Windows executable for Proton. No game files or derived data are included.

Validation

  • cargo test --workspace --locked on Linux: 155 passed, 3 ignored, 0 failed.
  • Windows MSVC release cross-build with xwin SDK, lld-link, and pure Rust BLAKE3: passed.
  • cargo xtask policy: passed (148 files).
  • git diff --check: passed.

cargo fmt --all -- --check still reports formatting differences already present on upstream main; this branch leaves those files' unrelated formatting alone.

**@⁠LaunchDoesntCode** on GitHub · 2026-11-23 23:37 UTC · [original](https://github.com/Marvisak/VIctory/pull/39) `fix/linux-portable-tests` → `main` · +84 −36 · 9 files · 1 commits · closed without merging ## Summary Make `cargo test --workspace --locked` run on Linux while keeping the title runtime and GPU implementation Windows-targeted. - Gate Windows-only GPU, HLE, dialog, and shader-translation entry points. - Make path and storage tests account for the host platform. - Keep tests that parse their own test executable as a PE image on Windows, where that fixture assumption holds. This supports Linux contributors who build the Windows executable for Proton. No game files or derived data are included. ## Validation - `cargo test --workspace --locked` on Linux: 155 passed, 3 ignored, 0 failed. - Windows MSVC release cross-build with xwin SDK, `lld-link`, and pure Rust BLAKE3: passed. - `cargo xtask policy`: passed (148 files). - `git diff --check`: passed. `cargo fmt --all -- --check` still reports formatting differences already present on upstream `main`; this branch leaves those files' unrelated formatting alone.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:47:39 +00:00
github-bot closed this pull request 2026-11-26 03:47:39 +00:00
Author
Owner

@⁠raffclar on GitHub · 2026-11-23 23:40 UTC · original

This is required for good CI and test automation

**@⁠raffclar** on GitHub · 2026-11-23 23:40 UTC · [original](https://github.com/Marvisak/VIctory/pull/39#issuecomment-7117221813) This is required for good CI and test automation
Author
Owner

@⁠raffclar on GitHub · 2026-11-23 23:40 UTC · original

The sooner, we can get CI running the tests, the better

**@⁠raffclar** on GitHub · 2026-11-23 23:40 UTC · [original](https://github.com/Marvisak/VIctory/pull/39#issuecomment-7117230811) The sooner, we can get CI running the tests, the better
Author
Owner

@⁠DaviTostes on GitHub · 2026-11-23 23:51 UTC · original

Tested c0b749d on Arch Linux x86_64, rustc 1.98.1 (the pinned toolchain): pass, and it makes the workspace testable here.

  • On main, cargo build -p victory-gpu fails on Linux with error[E0425]: cannot find function 'host_resource' in crates/victory-gpu/src/resource.rs. On this head the workspace builds.
  • cargo test --workspace: 156 passed, 0 failed, 3 ignored (all test binaries), no game data and no victory.toml used.

This is the Linux baseline the other open PRs can be checked against.

AI-assisted (DeepSeek V4.1 Flash coding agent).

**@⁠DaviTostes** on GitHub · 2026-11-23 23:51 UTC · [original](https://github.com/Marvisak/VIctory/pull/39#issuecomment-7117437151) Tested `c0b749d` on **Arch Linux x86_64, rustc 1.98.1 (the pinned toolchain)**: **pass**, and it makes the workspace testable here. - On `main`, `cargo build -p victory-gpu` fails on Linux with `error[E0425]: cannot find function 'host_resource'` in `crates/victory-gpu/src/resource.rs`. On this head the workspace builds. - `cargo test --workspace`: **156 passed, 0 failed, 3 ignored** (all test binaries), no game data and no `victory.toml` used. This is the Linux baseline the other open PRs can be checked against. AI-assisted (DeepSeek V4.1 Flash coding agent).
Author
Owner

@⁠Quat3rnion on GitHub · 2026-11-24 00:37 UTC · original

Superseded by #112, which carries your host-aware path and storage tests and keeps the data/shader tools usable on Linux. Verified on Linux: 156 passed, 0 failed, 3 ignored with the pinned toolchain. Thanks for the groundwork, @⁠LaunchDoesntCode.

**@⁠Quat3rnion** on GitHub · 2026-11-24 00:37 UTC · [original](https://github.com/Marvisak/VIctory/pull/39#issuecomment-7118269950) Superseded by #112, which carries your host-aware path and storage tests and keeps the data/shader tools usable on Linux. Verified on Linux: 156 passed, 0 failed, 3 ignored with the pinned toolchain. Thanks for the groundwork, @⁠LaunchDoesntCode.
Author
Owner

@⁠SkippySteve on GitHub · 2026-11-24 01:39 UTC · original

Heads-up: this PR is currently conflicting with main.

I rebased the same set of gates onto current upstream/main (d2a4bae) here, in case it saves you some time:
https://github.com/SkippySteve/VIctory/tree/linux-workspace-gates (one commit, compare)

Results on x86_64 Arch Linux:

main linux-workspace-gates
cargo check --workspace --tests --locked fails: E0425 host_resource in victory-gpu ok
cargo test --workspace --locked — 162 passed, 0 failed, 3 ignored
cargo build --workspace --locked --release — ok
cargo xtask policy — ok

It covers the same files as this PR: the view_format gate, d3d12x allocator hookup, XLaunchNewGame relaunch, the xgameui dialog, and the PE/path-rule tests being Windows-only. The test modules whose remaining tests are all gated also get an allow(unused_imports) so Linux builds stay warning-free.

The one real difference is apps/victory/src/translate.rs. Instead of gating in main.rs, it adds a small off-Windows Validator/Host stub that reports "needs Windows (D3D12 / dxil.dll)". With that, victory translate still runs on Linux (translation and structuring work; validation and pipeline creation are reported as unavailable) instead of being compiled out.

Feel free to pull or reset onto that branch. Or, if you'd rather, say the word and I'll open a superseding PR based on #39 that credits you (Co-authored-by).

**@⁠SkippySteve** on GitHub · 2026-11-24 01:39 UTC · [original](https://github.com/Marvisak/VIctory/pull/39#issuecomment-7119317968) Heads-up: this PR is currently **conflicting** with `main`. I rebased the same set of gates onto current `upstream/main` (`d2a4bae`) here, in case it saves you some time: https://github.com/SkippySteve/VIctory/tree/linux-workspace-gates (one commit, [`compare`](https://github.com/Marvisak/VIctory/compare/main...SkippySteve:VIctory:linux-workspace-gates)) Results on x86_64 Arch Linux: | | `main` | `linux-workspace-gates` | |---|---|---| | `cargo check --workspace --tests --locked` | fails: E0425 `host_resource` in victory-gpu | ok | | `cargo test --workspace --locked` | — | **162 passed, 0 failed, 3 ignored** | | `cargo build --workspace --locked --release` | — | ok | | `cargo xtask policy` | — | ok | It covers the same files as this PR: the `view_format` gate, d3d12x allocator hookup, `XLaunchNewGame` relaunch, the xgameui dialog, and the PE/path-rule tests being Windows-only. The test modules whose remaining tests are all gated also get an `allow(unused_imports)` so Linux builds stay warning-free. The one real difference is `apps/victory/src/translate.rs`. Instead of gating in `main.rs`, it adds a small off-Windows `Validator`/`Host` stub that reports "needs Windows (D3D12 / dxil.dll)". With that, `victory translate` still runs on Linux (translation and structuring work; validation and pipeline creation are reported as unavailable) instead of being compiled out. Feel free to pull or reset onto that branch. Or, if you'd rather, say the word and I'll open a superseding PR based on #39 that credits you (Co-authored-by).
Author
Owner

@⁠SkippySteve on GitHub · 2026-11-24 01:41 UTC · original

Thanks @⁠LaunchDoesntCode for this approach. I've rebased the gates as a minimal change onto current main in #235, with credit to this PR, so Linux builds work while #112 is still in progress.

**@⁠SkippySteve** on GitHub · 2026-11-24 01:41 UTC · [original](https://github.com/Marvisak/VIctory/pull/39#issuecomment-7119346009) Thanks @⁠LaunchDoesntCode for this approach. I've rebased the gates as a minimal change onto current main in #235, with credit to this PR, so Linux builds work while #112 is still in progress.

Pull request closed

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!39
No description provided.