GPU: rename the second test module in host.rs so the tests compile #129

Merged
Luislariosss merged 1 commit from upstream-pr/129 into main 2026-11-24 00:57:53 +00:00
Luislariosss commented 2026-11-24 00:46:26 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Luislariosss on 2026-11-24T00:46:26Z.


cargo test --workspace does not compile on main:

error[E0428]: the name `tests` is defined multiple times
--> crates\victory-gpu\src\host.rs:1974:1

host.rs declares #[cfg(test)] mod tests twice: one near the top (the warp adapter test) and one at the end (the Batch::texture_due tests). They arrived in different merges, and rustc stops the crate before running anything.

Fix

The second block only touches Batch, so it becomes mod batch and keeps both of its tests. One line, no test bodies changed.

Verified

before:  error[E0428] ... could not compile `victory-gpu` (lib test)
after:   cargo test -p victory-gpu --lib     43 passed, 0 failed, 1 ignored
         cargo test --workspace              compiles and every crate reports ok
         cargo clippy --workspace --all-targets   clean
         cargo xtask policy                  151 files ok

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.

<!-- greyfinch-sync:Marvisak/VIctory:issue:6572003531 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/129). Originally posted by [Luislariosss](https://github.com/Luislariosss) on 2026-11-24T00:46:26Z. --- `cargo test --workspace` does not compile on `main`: ``` error[E0428]: the name `tests` is defined multiple times --> crates\victory-gpu\src\host.rs:1974:1 ``` `host.rs` declares `#[cfg(test)] mod tests` twice: one near the top (the warp adapter test) and one at the end (the `Batch::texture_due` tests). They arrived in different merges, and rustc stops the crate before running anything. ## Fix The second block only touches `Batch`, so it becomes `mod batch` and keeps both of its tests. One line, no test bodies changed. ## Verified ``` before: error[E0428] ... could not compile `victory-gpu` (lib test) after: cargo test -p victory-gpu --lib 43 passed, 0 failed, 1 ignored cargo test --workspace compiles and every crate reports ok cargo clippy --workspace --all-targets clean cargo xtask policy 151 files ok ``` 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.
raffclar commented 2026-11-24 00:52:22 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by raffclar on 2026-11-24T00:52:22Z.

Review: APPROVED


Yep this sorts it

<!-- greyfinch-sync:Marvisak/VIctory:review:6031948813 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/129#pullrequestreview-6031948813). Originally posted by [raffclar](https://github.com/raffclar) on 2026-11-24T00:52:22Z. **Review:** APPROVED --- Yep this sorts it
upstream-sync closed this pull request 2026-11-24 06:51:26 +00:00
TheHoracio commented 2026-11-24 06:54:44 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by TheHoracio on 2026-11-24T00:48:38Z.


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.

  • main 9aef3d9: cargo test --workspace fails with the same E0428 in crates\victory-gpu\src\host.rs:1974.
  • PR head 7102a49 (on 8a8a38d): cargo test --workspace 263 passed, 0 failed, 4 ignored. host::batch::a_texture_is_checked_once_per_submission and host::tests::warp_adapter_accepts_only_software both pass.
  • PR head merged onto main 9aef3d9: 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.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7118455924 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/129#issuecomment-7118455924). Originally posted by [TheHoracio](https://github.com/TheHoracio) on 2026-11-24T00:48:38Z. --- 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. - `main` `9aef3d9`: `cargo test --workspace` fails with the same `E0428` in `crates\victory-gpu\src\host.rs:1974`. - PR head `7102a49` (on `8a8a38d`): `cargo test --workspace` **263 passed, 0 failed, 4 ignored**. `host::batch::a_texture_is_checked_once_per_submission` and `host::tests::warp_adapter_accepts_only_software` both pass. - PR head merged onto `main` `9aef3d9`: 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 commented 2026-11-24 06:54:45 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by lordon1a on 2026-11-24T00:51:41Z.


Verified 7102a4989 on Windows 11 (x86_64-pc-windows-gnullvm, rustc 1.100.0, applied cleanly to main@4c0bb89): pass.

  • cargo xtask policy: 151 files ok
  • cargo test -p victory-gpu: 43 passed, 0 failed, 1 ignored (fixes the E0428 duplicate mod tests build failure on main@4c0bb89).

AI-assisted.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7118511493 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/129#issuecomment-7118511493). Originally posted by [lordon1a](https://github.com/lordon1a) on 2026-11-24T00:51:41Z. --- Verified `7102a4989` on Windows 11 (`x86_64-pc-windows-gnullvm`, `rustc 1.100.0`, applied cleanly to `main@4c0bb89`): **pass**. - `cargo xtask policy`: 151 files ok - `cargo test -p victory-gpu`: **43 passed, 0 failed, 1 ignored** (fixes the E0428 duplicate `mod tests` build failure on `main@4c0bb89`). AI-assisted.
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!129
No description provided.