Tests: gate own-PE binary tests to Windows and clean non-Windows test warnings #192

Open
gdawid9407 wants to merge 1 commit from upstream-pr/192 into main
gdawid9407 commented 2026-11-24 22:22:05 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by gdawid9407 on 2026-11-24T22:22:05Z.


victory-pe unit tests reading std::env::current_exe() assume the test runner binary is a PE32+ image, panicking on Mach-O/ELF hosts when running offline crate tests on macOS or Linux. Gate the own_image() tests to target_os = "windows" and #[cfg(windows)]-gate Windows-only test imports/bindings in victory-shader so both Windows CI and non-Windows hosts pass clippy --all-targets -- -D warnings and cargo test.

<!-- greyfinch-sync:fxceless/victory-fork:issue:6592585085 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/192). Originally posted by [gdawid9407](https://github.com/gdawid9407) on 2026-11-24T22:22:05Z. --- `victory-pe` unit tests reading `std::env::current_exe()` assume the test runner binary is a PE32+ image, panicking on Mach-O/ELF hosts when running offline crate tests on macOS or Linux. Gate the `own_image()` tests to `target_os = "windows"` and `#[cfg(windows)]`-gate Windows-only test imports/bindings in `victory-shader` so both Windows CI and non-Windows hosts pass `clippy --all-targets -- -D warnings` and `cargo test`.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/192:upstream-pr/192'
git switch 'upstream-pr/192'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/192'
git switch 'upstream-pr/192'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/192'
git switch 'upstream-pr/192'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/192'
git switch 'main'
git merge --squash 'upstream-pr/192'
git switch 'main'
git merge --ff-only 'upstream-pr/192'
git switch 'main'
git merge 'upstream-pr/192'
git push origin 'main'
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
fxceless/victory-fork!192
No description provided.