Skip to content

Build: make workspace tests run on Linux - #39

Closed
LaunchDoesntCode wants to merge 1 commit into
Marvisak:mainfrom
LaunchDoesntCode:fix/linux-portable-tests
Closed

LaunchDoesntCode wants to merge 1 commit into
Marvisak:mainfrom
LaunchDoesntCode:fix/linux-portable-tests

Conversation

@LaunchDoesntCode

Copy link
Copy Markdown
Contributor

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.

@raffclar

Copy link
Copy Markdown
Contributor

This is required for good CI and test automation

@raffclar

Copy link
Copy Markdown
Contributor

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

@DaviTostes

Copy link
Copy Markdown

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

This was referenced Nov 23, 2026
@Quat3rnion

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown

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

Copy link
Copy Markdown

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants