Skip to content

Scripts: cover test runner failures and missing Cargo - #296

Open
svds12343 wants to merge 1 commit into
ivall:mainfrom
svds12343:contrib/test-runner-failure-cases
Open

svds12343 wants to merge 1 commit into
ivall:mainfrom
svds12343:contrib/test-runner-failure-cases

Conversation

@svds12343

@svds12343 svds12343 commented Nov 23, 2026 •

Copy link
Copy Markdown

The runner's regression test covered successful stderr output, but failure codes and missing Cargo were checked only manually in #185. Add permanent cases to catch failures being reported as success.

Complements #279, which adds CI execution of this script.

What is in it

  • scripts/test-native-stderr.tests.ps1: run each case in a fresh instance of the same PowerShell. Check success, build exit 17 without starting tests, test exit 101, and missing Cargo exit 1 with a diagnostic.
  • Preserve redirected stderr and skip-summary checks; return 0 only after all assertions pass so expected child failures do not fail the CI shell wrapper.

Tested

  • Windows 11 build 26200, i7-12700K, RTX 3070 (driver 32.0.16.1088), Rust 1.100.0 MSVC, DXC 1.9.2602.17, debug. Tested working-tree patch committed unchanged as 29e66d46e5a2869901d9b65f3f26427b07673111.
  • powershell.exe / pwsh.exe -NoProfile -File scripts/test-native-stderr.tests.ps1: all four cases pass under PowerShell 5.1.26100.9444 and 7.6.9. Both also pass with the CI-style caller & <script>; exit $LASTEXITCODE.
  • Five deliberately broken runner copies rejected: original stderr regression on 5.1; swallowed build/test failures, tests after failed build, and removed Cargo preflight on both shells (nine expected failures).
  • scripts/test.ps1 (cargo build --workspace, cargo test --workspace -- --test-threads=4): 651 passed, 0 failed, 40 ignored.
  • GPU SKIPPED: gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware (no native wave64).
  • git diff --check: clean.

Regression run

  • Not required: only a script test changes.

Not tested

  • Release builds, AMD/Intel GPUs, retail games. All XCL_SAMPLE_* variables are unset; their early returns and the GPU skips remain included in libtest's passed count.

AI use

  • Codex (GPT-6; exact model variant unavailable) wrote the change and description, reviewed the diff, and ran validation on this PC.

Preserve the manually checked build/test exit codes and missing-Cargo behavior as subprocess regression cases. Verify the Cargo phase sequence and keep the native stderr regression covered in both PowerShell generations.

Assisted-by: Codex (GPT-6; exact model variant unavailable)
@svds12343
svds12343 marked this pull request as ready for review November 23, 2026 22:38
@requiemsnkrp

Copy link
Copy Markdown

Tested 29e66d4 on NVIDIA GeForce RTX 3060 12 GB (driver 32.0.16.1714 / 617.14, 32-lane waves), Ryzen 5 5600X, Windows 11 Pro 25H2 (26200.9974), Rust 1.100.0 (stable-x86_64-pc-windows-msvc), DXC 1.9.2602.17 (Windows SDK), debug: pass.

Tested

  • powershell -NoProfile -NonInteractive -File scripts\test-native-stderr.tests.ps1 (Windows PowerShell 5.1.26100.9818): PASS: success, PASS: build failure, PASS: test failure, PASS: missing Cargo, exit 0. The same script from main 4017f8f: exit 0.
  • Mutation check: with the build exit-code line of a throwaway copy of scripts\test.ps1 removed, the script fails with build failure: expected exit 17, got 0. (exit 1).
  • cargo test --workspace -j 4 --no-fail-fast -- --test-threads=4 --skip test_title_runs_and_game_folder_is_untouched --skip test_title_draws_with_a_root_signature_under_the_debug_layer: 649 passed, 0 failed, 40 ignored
  • SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware
  • main 4017f8f, same command: 650 passed, 0 failed, 40 ignored, same 2 SKIPPED (one test more on main since this PR's base 9ab7d76).
  • Tested the head itself; it merges cleanly into main 4017f8f (git merge-tree), the merge result was not tested.
  • Not run here: the two e2e tests that run the test title (test_title_runs_and_game_folder_is_untouched, test_title_draws_with_a_root_signature_under_the_debug_layer): they open the XCL game window and this PC was in use (the 2 "filtered out").

Not tested

  • PowerShell 7 (pwsh is not installed here).
  • Retail title regression run (not needed for a script change; no game copy here).

AI use: Claude Code with Claude Opus 5.5 (ran the tests and wrote this report).

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.

2 participants