Build: make workspace tests run on Linux #39

Closed
LaunchDoesntCode wants to merge 1 commit from upstream-pr/39 into main
LaunchDoesntCode commented 2026-11-23 23:37:35 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by LaunchDoesntCode on 2026-11-23T23:37:35Z.


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.

<!-- greyfinch-sync:Marvisak/VIctory:issue:6571124478 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/39). Originally posted by [LaunchDoesntCode](https://github.com/LaunchDoesntCode) on 2026-11-23T23:37:35Z. --- ## 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.
upstream-sync closed this pull request 2026-11-24 06:51:01 +00:00
raffclar commented 2026-11-24 06:54:31 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by raffclar on 2026-11-23T23:40:07Z.


This is required for good CI and test automation

<!-- greyfinch-sync:Marvisak/VIctory:comment:7117221813 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/39#issuecomment-7117221813). Originally posted by [raffclar](https://github.com/raffclar) on 2026-11-23T23:40:07Z. --- This is required for good CI and test automation
raffclar commented 2026-11-24 06:54:31 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by raffclar on 2026-11-23T23:40:36Z.


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

<!-- greyfinch-sync:Marvisak/VIctory:comment:7117230811 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/39#issuecomment-7117230811). Originally posted by [raffclar](https://github.com/raffclar) on 2026-11-23T23:40:36Z. --- The sooner, we can get CI running the tests, the better
DaviTostes commented 2026-11-24 06:54:33 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DaviTostes on 2026-11-23T23:51:25Z.


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).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7117437151 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/39#issuecomment-7117437151). Originally posted by [DaviTostes](https://github.com/DaviTostes) on 2026-11-23T23:51:25Z. --- 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).
Quat3rnion commented 2026-11-24 06:54:40 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Quat3rnion on 2026-11-24T00:37:54Z.


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.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7118269950 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/39#issuecomment-7118269950). Originally posted by [Quat3rnion](https://github.com/Quat3rnion) on 2026-11-24T00:37:54Z. --- 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.
SkippySteve commented 2026-11-24 06:55:02 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by SkippySteve on 2026-11-24T01:39:25Z.


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).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7119317968 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/39#issuecomment-7119317968). Originally posted by [SkippySteve](https://github.com/SkippySteve) on 2026-11-24T01:39:25Z. --- 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).
SkippySteve commented 2026-11-24 06:55:02 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by SkippySteve on 2026-11-24T01:41:09Z.


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.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7119346009 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/39#issuecomment-7119346009). Originally posted by [SkippySteve](https://github.com/SkippySteve) on 2026-11-24T01:41:09Z. --- 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

Sign in to join this conversation.
No reviewers
No labels
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.

Reference
Marvisak/VIctory!39
No description provided.