Skip to content

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

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

svds12343 wants to merge 1 commit into
xcl-dev: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
Contributor

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

@anes66

anes66 commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Verified 29e66d46e5a2869901d9b65f3f26427b07673111 on Windows 10 Pro (build 19045), Ryzen 7 9800X3D.

Tested

  • Windows PowerShell 5.1.19041.7844:
    powershell.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -File scripts/test-native-stderr.tests.ps1
  • PowerShell 7.6.9:
    pwsh.exe -NoProfile -NonInteractive -File scripts/test-native-stderr.tests.ps1
  • All four cases passed in both shells: success, build failure, test failure and missing Cargo. Both runs exited 0.
  • This PR's scripts/test.ps1 matches main f4ce27ceb6d1b0576d0c659b713b674778bf1968.

PowerShell 5.1 initially blocked the unsigned script. The process-only override above allowed it to run; no persistent execution-policy setting was changed.

Not tested
Rust workspace, GPU tests, retail titles, GitHub Actions or mutation checks. These runs used the synthetic cargo.cmd fixture, not an actual Cargo build.

AI use
Codex (GPT-6; exact variant unavailable) inspected the changes, ran validation and drafted this report.

@DavidM1911

Copy link
Copy Markdown
Contributor

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

Thanks!

@RavenCurseBurg

RavenCurseBurg commented Nov 26, 2026 •

Copy link
Copy Markdown

Tested 29e66d46e5a2869901d9b65f3f26427b07673111 using the four existing fake-Cargo cases under Windows PowerShell 5.1 and PowerShell 7.6.9. I varied the checkout and TEMP directories independently, using spaces in every path and literal square brackets in neither, either or both.

With the original fixture and runner, the two ordinary-path runs passed. The other six shell/path combinations stopped in the success control. A bracketed checkout failed at Set-Location; a bracketed TEMP path left the fixture's Cargo call log empty. Substituting main's runner from b49be1836844 gave the same six failures.

Candidate fix and regression case: all 32 checks passed (4 Cargo cases × 4 path combinations × 2 shells). Success, build exit 17, test exit 101 and missing Cargo exit 1 all retained the expected invocation sequence; no fixture directories remained. On main's runner, the revised success control also failed in both shells before the one-line literal-directory change and all four controls passed in each shell after it.

Commands: powershell.exe and pwsh.exe -NoProfile -NonInteractive -ExecutionPolicy RemoteSigned -File scripts/test-native-stderr.tests.ps1 in each directory layout. Windows build 26100, i7-13700. OpenAI Codex (GPT-6) prepared the patch and ran the checks. Only the Cargo stand-in was used; no Rust build, GPU or title run.

@svds12343
svds12343 marked this pull request as draft November 29, 2026 12:23
@github-actions github-actions Bot added the area:tests Unit, integration, e2e tests, or testtitle label Nov 29, 2026
@svds12343 svds12343 closed this Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:tests Unit, integration, e2e tests, or testtitle off-goal Does not bear on the current goal (world loading); waits until it is reached

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants