GPU: rename the second test module in host.rs so the tests compile #129
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!129
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/129/head"
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?
@Luislariosss on GitHub · 2026-11-24 00:46 UTC · original
Luislariosss:fix/duplicate-test-module→main· +1 −1 · 1 files · 1 commits · merged 2026-11-24 00:57 UTCcargo test --workspacedoes not compile onmain:host.rsdeclares#[cfg(test)] mod teststwice: one near the top (the warp adapter test) and one at the end (theBatch::texture_duetests). They arrived in different merges, and rustc stops the crate before running anything.Fix
The second block only touches
Batch, so it becomesmod batchand keeps both of its tests. One line, no test bodies changed.Verified
I found this while checking that the tree still builds without the game, which is the state a contributor needs before touching anything. AI-assisted.
cargo test --workspace does not compile on main: host.rs declares #[cfg(test)] mod tests twice, once near the top for the warp adapter test and once at the end for the Batch::texture_due tests, so rustc rejects the crate with E0428 before running anything: error[E0428]: the name ests is defined multiple times --> crates\victory-gpu\src\host.rs:1974:1 The second block only touches Batch, so it becomes mod batch and keeps its two tests. cargo test -p victory-gpu --lib goes from "could not compile" to 43 passed, 0 failed, 1 ignored, and cargo test --workspace compiles again. Nothing else changes: one line, no test bodies touched.@TheHoracio on GitHub · 2026-11-24 00:48 UTC · original
Tested on AMD RDNA3: RX 7800 XT (16 GB), driver 32.0.32015.7029, Ryzen 7 9800X3D, Windows 11 Pro 10.0.26300, toolchain 1.98.1 from
rust-toolchain.toml, debug build. No game data was used.main9aef3d9:cargo test --workspacefails with the sameE0428incrates\victory-gpu\src\host.rs:1974.7102a49(on8a8a38d):cargo test --workspace263 passed, 0 failed, 4 ignored.host::batch::a_texture_is_checked_once_per_submissionandhost::tests::warp_adapter_accepts_only_softwareboth pass.main9aef3d9: merges cleanly, 264 passed, 0 failed, 4 ignored.Not tested: clippy,
cargo xtask policy, a release build of the tests.AI use: Claude Code ran the commands and drafted this comment; the runs are real runs on the hardware above.
@lordon1a on GitHub · 2026-11-24 00:51 UTC · original
Verified
7102a4989on Windows 11 (x86_64-pc-windows-gnullvm,rustc 1.100.0, applied cleanly tomain@4c0bb89): pass.cargo xtask policy: 151 files okcargo test -p victory-gpu: 43 passed, 0 failed, 1 ignored (fixes the E0428 duplicatemod testsbuild failure onmain@4c0bb89).AI-assisted.