Skip to content

Scripts: summarize live and saved test results - #2304

Draft
jeroenhaentjens wants to merge 1 commit into
xcl-dev:mainfrom
jeroenhaentjens:scripts/test-log-summaries
Draft

jeroenhaentjens wants to merge 1 commit into
xcl-dev:mainfrom
jeroenhaentjens:scripts/test-log-summaries

Conversation

@jeroenhaentjens

@jeroenhaentjens jeroenhaentjens commented Nov 25, 2026 •

Copy link
Copy Markdown

Cargo prints a result for each test suite, so contributors currently add the counts manually. This adds combined totals to scripts/test.ps1 and a command for summarizing saved logs without rerunning tests.

What is in it

  • The live runner totals completed suites, preserves Cargo's exit code and source output, strips ANSI colors for parsing, and counts both standalone and inline SKIPPED records.
  • scripts/summarize-tests.ps1 -LiteralPath test.log [-Json] reads UTF-8/UTF-16 logs and reports totals, skip records, named failures and missing sample inputs. It rejects logs without completed summaries and warns about unmatched suite starts, including captures beginning at an earlier suite's result. Repeated runs are summed; skips are not subtracted from passed counts.
  • README and fixture tests in Windows CI under PowerShell 5.1 and 7. The incomplete-capture fix and optional --locked fixture compatibility incorporate 8ee110ff and 6f922ece, with cyriczhang credited as co-author.

Tested

  • Updated fork commit: 30cbbf00c861909ec4a71e3fcfd70b691de99b4d, based on 1a0bbe3. Windows 11 Pro 26200, i7-9750H, 32 GB RAM, NVIDIA Quadro RTX 3000 (32.0.15.9706), Intel UHD 630 also present, Rust/Cargo 1.100.0, DXC 1.9.2609.5.
  • New checks on this revision, with both Windows PowerShell 5.1.26100.9818 and PowerShell 7.6.9: scripts/test-totals.tests.ps1 7 passed, scripts/summarize-tests.tests.ps1 8 passed, and scripts/test-native-stderr.tests.ps1 passed; 0 failed or skipped. Both reported regressions failed against the original script before fixing them. The live fixture also passes with --locked and correctly rejects a deliberately dropped forwarded argument.
  • Two stored full-suite logs replayed through fixture Cargo and the saved-log command per shell: 1249/1/46/26 and 1265/0/46/28 passed/failed/ignored/skip records. Live and saved totals and skip groups match; original exit statuses are preserved and source SHA-256 hashes unchanged. These are log replays, not new GPU runs.
  • python -m unittest discover -s scripts -p 'test_*.py': 25 passed. git diff --check: passed.
  • Earlier full workspace run on 320d27f (the Rust sources are unchanged in this update): cargo build --workspace --locked passed; cargo test --workspace --locked --no-fail-fast -- --test-threads=4 reported 1,249 passed, 1 failed, 46 ignored, exit 101. Failure: hle::d3d12x::bind::tests::execute_indirect_reads_the_arguments_written_before_it, also present in an earlier baseline; its separate test-setup correction is Tests: honor the selected adapter in the indirect argument test #2318. Debug build, symbols/incremental disabled, XCL_ADAPTER=nvidia, XCL_HEAP_WINDOWS=1, no sample inputs. 26 SKIPPED records: native-wave64 limits, unsupported f16, missing debug layer and unavailable cache control. This PR remains draft because that full-suite run is not green.

Not tested

  • No new GPU suite or retail smoke for this script-only revision, other GPUs, ignored tests or missing sample-data checks. Remote CI requires maintainer approval. Successfully summarizing a log does not prove that its original command succeeded or completed.

AI use

  • Codex, with subagents, wrote the implementation, tests and description and ran the validation; exact model identifier unavailable. The credited contributor patches disclose OpenAI Codex (GPT-6).

@RavenCurseBurg

RavenCurseBurg commented Nov 25, 2026 •

Copy link
Copy Markdown

Retest of the author's updated branch, commit 30cbbf00c861909ec4a71e3fcfd70b691de99b4d. Confirmed the leading-result regression now passes and the live runner handles the inline skip case. I ran scripts/test-totals.tests.ps1 (7 cases), scripts/summarize-tests.tests.ps1 (8 cases), and scripts/test-native-stderr.tests.ps1 on Windows PowerShell 5.1.26100.9711 and PowerShell 7.6.9. All three scripts exited 0 in each shell. This was a CPU-only fixture run on Windows 11 26100.9711; no real Cargo, GPU or retail run. OpenAI Codex (GPT-6) ran this retest. Thank you for integrating the patches.

On 320d27f260454525eef96e2ef7a8c4c427c9deb6, the saved-log command can miss the incomplete-run warning when capture starts after the first suite’s start line. The shortest fixture I tested was two lines:

test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out;
running 1 test

scripts\summarize-tests.ps1 -LiteralPath <log> -Json correctly counted the two passes, but the notes did not flag the unfinished suite. I also checked a longer fixture containing a named failure, a skip, an empty completed suite and a final suite start. Removing only the first start line made the warning disappear in UTF-8, UTF-16 LE and UTF-16 BE under both Windows PowerShell 5.1.26100.9711 and PowerShell 7.6.9. Totals, failure names, skip records and input file hashes were preserved.

Cherry-pickable fix and regression test. The new two-line fixture failed on the PR head in both shells. With the fix, all 12 longer fixture comparisons produced the warning and preserved the results. scripts\summarize-tests.tests.ps1 (8 cases) and scripts\test-totals.tests.ps1 (6 cases, fixture Cargo) passed in each shell.

Windows 11 26100.9711, i7-13700, RTX 4060. No real Cargo suite, GPU workload or retail run. OpenAI Codex (GPT-6) ran the checks, wrote the patch and prepared this report.

Interaction with #2295. Its two --locked commands preserve the forwarded test arguments but trip the live-runner fixture’s literal argument check on this head. The one-line test fix passed all six cases with either runner in both shells and still rejected dropped arguments. Commands and results on #2295.

@nnonno91

Copy link
Copy Markdown

I found a skip-count difference between the live and saved-log scripts on 320d27f260454525eef96e2ef7a8c4c427c9deb6.

Tested

  • Windows 11 25H2 build 26200.9974, Ryzen 7 9800X3D, Windows PowerShell 5.1 and PowerShell 7.6.9. Ran scripts/test-totals.tests.ps1 and scripts/summarize-tests.tests.ps1 in each shell. All 6 live cases and all 7 saved-log cases passed per shell.
  • I then fed the same fixture to scripts/test.ps1 through a stub cargo.cmd (following the checked-in fixture) and directly to scripts/summarize-tests.ps1 -LiteralPath input.txt -Json. The fixture had one standalone skip (SKIPPED gpu_one: no wave64), one inline skip (test gpu_two ... SKIPPED gpu_two: no mesh shaders), and a completed suite with 2 passed.
  • On both shells the live runner printed both source lines but summarized only 1 (no wave64). The saved-log script counted both skips. Both reported 2 passed and exited 0. The fixture's SHA-256 was unchanged.

Not tested

Other shells, actual GPU execution and the workspace test suite.

AI use

OpenAI Codex (GPT-6.2 Sol) prepared the fixture, ran the checks and wrote this report.

@jeroenhaentjens

Copy link
Copy Markdown
Author

Thanks @nnonno91 and @RavenCurseBurg. Both reported cases are reproduced and fixed in 30cbbf00c861909ec4a71e3fcfd70b691de99b4d: inline skips now reach the live summary, and a leading result no longer masks a later unfinished suite. I incorporated the supplied incomplete-capture and optional --locked fixture patches and credited cyriczhang as co-author.

Tested: Windows 11 Pro 26200, i7-9750H; PowerShell 5.1.26100.9818 and 7.6.9. The new regressions fail before their fixes. After: 7 live cases, 8 saved-log cases and the native-stderr fixture pass per shell, no skips. The --locked variant passes; deliberately dropping the forwarded argument fails. Two real stored full-suite logs replay with matching live/saved counts and skip groups in both shells (1249/1/46/26 and 1265/0/46/28 passed/failed/ignored/skips), unchanged hashes and preserved exit statuses. Python script tests: 25 passed; git diff --check passes.

Not tested: No new GPU or retail run; the earlier full-suite result and its known ExecuteIndirect failure remain explicitly listed in the description, so this stays draft. This update changes no Rust sources.

AI use: Codex with subagents (exact model identifier unavailable) implemented/reviewed the changes and ran these checks; supplied patches retain their OpenAI Codex (GPT-6) disclosure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

4 participants