Tests: add structured Cargo test reports with explicit skip classification #126

Open
github-bot wants to merge 1 commit from github-bot/gh-126 into main AGit
Owner

@⁠fladit123 on GitHub · 2026-11-26 17:32 UTC · original
fladit123:tests/structured-test-report → main · +724 −0 · 6 files · 1 commits · open

🇧🇷 Português

Resumo

Adiciona um utilitário independente em PowerShell 7.4+ para gerar relatórios estruturados de testes selecionados do Cargo/libtest, distinguindo os resultados do framework das evidências de cobertura funcional.

Complementa os diagnósticos de adaptador e skips introduzidos pela #43, em resposta às questões levantadas na #32.

Alterações

  • Relatórios em texto e JSON.
  • Classificação explícita de testes aprovados, reprovados, ignorados, indisponíveis, parciais e inconclusivos.
  • Preservação dos logs originais de stdout e stderr.
  • Classificação conservadora por padrão e opção -TrustHarness para seleções previamente revisadas.
  • Metadados de reprodução e indicadores de configuração.
  • Timeout aplicado ao processo e à captura dos fluxos de saída.
  • Registro separado dos códigos de saída do Cargo e do utilitário.
  • Documentação, fixtures do parser e testes permanentes de integração.

Validação

Windows 11, PowerShell 7.6.10, Rust 1.98.1 MSVC.

Todos os testes sintéticos e de integração passaram.

Durante a revisão, foi identificado um defeito na implementação inicial: um subprocesso que mantinha os fluxos de saída abertos fazia um timeout de dois segundos durar aproximadamente 8,5 segundos.

Após a correção, a mesma reprodução terminou em 2,042 segundos, retornando código 124 e preservando o código zero original do Cargo.

Os testes permanentes também confirmaram o tratamento de falhas, seleções vazias e interrupções.

A política do repositório aprovou 205 arquivos.


🇺🇸 English

Summary

Adds a standalone PowerShell 7.4+ utility for structured reporting of selected Cargo/libtest runs, distinguishing harness outcomes from evidence of functional coverage.

This complements the adapter identification and explicit skip diagnostics introduced in #43, following the concerns raised in #32.

Changes

  • Structured JSON and human-readable text reports.
  • Explicit passed, failed, ignored, unavailable, partial and inconclusive classifications.
  • Preservation of original stdout and stderr logs.
  • Conservative coverage classification by default.
  • Optional -TrustHarness mode for reviewed test selections.
  • Reproduction metadata and relevant configuration indicators.
  • Bounded process and output-capture timeouts.
  • Separate Cargo and wrapper exit codes.
  • Documentation, parser fixtures and permanent integration tests.

Validation

Windows 11, PowerShell 7.6.10, Rust 1.98.1 MSVC.

All synthetic parser and integration assertions passed.

Integration scenario Wrapper exit Result
Successful test 0 completed
Assertion failure 101 failed
Empty selection 0 no_tests_selected
Process timeout 124 interrupted
Pending output capture timeout 124 interrupted

During review, a timeout defect was independently reproduced in the initial implementation. A two-second deadline took approximately 8.5 seconds when a descendant retained the output streams after Cargo exited.

After correction, the same reproduction returned exit code 124 in 2.042 seconds, preserving Cargo's original exit code of zero and explicitly marking the capture as incomplete.

The permanent integration tests also passed with five-second deadlines:

  • Process timeout: 5.083 seconds.
  • Pending output capture timeout: 5.035 seconds.

Repository policy: 205 files checked successfully.

Scope and limitations

  • No runtime or shader translator changes.
  • No additional external dependencies.
  • No changes to the existing CI workflow.
  • GPU and shader differential tests were not executed.
  • Configuration indicators do not independently establish hardware or compiler usage.
  • Descendants that outlive their parent may continue running. Pending output streams no longer block the wrapper indefinitely when a timeout is configured.

Reproduction

pwsh -NoProfile -File scripts/test-report.tests.ps1
pwsh -NoProfile -File scripts/test-report.integration.tests.ps1

AI-assisted development and review with Codex and ChatGPT. All reported validation was performed locally on Windows.

**@⁠fladit123** on GitHub · 2026-11-26 17:32 UTC · [original](https://github.com/uiliannn/VItoriaBr/pull/126) `fladit123:tests/structured-test-report` → `main` · +724 −0 · 6 files · 1 commits · open ## 🇧🇷 Português ### Resumo Adiciona um utilitário independente em PowerShell 7.4+ para gerar relatórios estruturados de testes selecionados do Cargo/libtest, distinguindo os resultados do framework das evidências de cobertura funcional. Complementa os diagnósticos de adaptador e skips introduzidos pela #43, em resposta às questões levantadas na #32. ### Alterações - Relatórios em texto e JSON. - Classificação explícita de testes aprovados, reprovados, ignorados, indisponíveis, parciais e inconclusivos. - Preservação dos logs originais de stdout e stderr. - Classificação conservadora por padrão e opção `-TrustHarness` para seleções previamente revisadas. - Metadados de reprodução e indicadores de configuração. - Timeout aplicado ao processo e à captura dos fluxos de saída. - Registro separado dos códigos de saída do Cargo e do utilitário. - Documentação, fixtures do parser e testes permanentes de integração. ### Validação Windows 11, PowerShell 7.6.10, Rust 1.98.1 MSVC. Todos os testes sintéticos e de integração passaram. Durante a revisão, foi identificado um defeito na implementação inicial: um subprocesso que mantinha os fluxos de saída abertos fazia um timeout de dois segundos durar aproximadamente 8,5 segundos. Após a correção, a mesma reprodução terminou em 2,042 segundos, retornando código 124 e preservando o código zero original do Cargo. Os testes permanentes também confirmaram o tratamento de falhas, seleções vazias e interrupções. A política do repositório aprovou 205 arquivos. --- ## 🇺🇸 English ### Summary Adds a standalone PowerShell 7.4+ utility for structured reporting of selected Cargo/libtest runs, distinguishing harness outcomes from evidence of functional coverage. This complements the adapter identification and explicit skip diagnostics introduced in #43, following the concerns raised in #32. ### Changes - Structured JSON and human-readable text reports. - Explicit passed, failed, ignored, unavailable, partial and inconclusive classifications. - Preservation of original stdout and stderr logs. - Conservative coverage classification by default. - Optional `-TrustHarness` mode for reviewed test selections. - Reproduction metadata and relevant configuration indicators. - Bounded process and output-capture timeouts. - Separate Cargo and wrapper exit codes. - Documentation, parser fixtures and permanent integration tests. ### Validation Windows 11, PowerShell 7.6.10, Rust 1.98.1 MSVC. All synthetic parser and integration assertions passed. | Integration scenario | Wrapper exit | Result | |---|---:|---| | Successful test | 0 | completed | | Assertion failure | 101 | failed | | Empty selection | 0 | no_tests_selected | | Process timeout | 124 | interrupted | | Pending output capture timeout | 124 | interrupted | During review, a timeout defect was independently reproduced in the initial implementation. A two-second deadline took approximately 8.5 seconds when a descendant retained the output streams after Cargo exited. After correction, the same reproduction returned exit code 124 in 2.042 seconds, preserving Cargo's original exit code of zero and explicitly marking the capture as incomplete. The permanent integration tests also passed with five-second deadlines: - Process timeout: 5.083 seconds. - Pending output capture timeout: 5.035 seconds. Repository policy: 205 files checked successfully. ### Scope and limitations - No runtime or shader translator changes. - No additional external dependencies. - No changes to the existing CI workflow. - GPU and shader differential tests were not executed. - Configuration indicators do not independently establish hardware or compiler usage. - Descendants that outlive their parent may continue running. Pending output streams no longer block the wrapper indefinitely when a timeout is configured. ### Reproduction ```powershell pwsh -NoProfile -File scripts/test-report.tests.ps1 pwsh -NoProfile -File scripts/test-report.integration.tests.ps1 ``` AI-assisted development and review with Codex and ChatGPT. All reported validation was performed locally on Windows.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 17:39:25 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/126/head:github-bot/gh-126'
git switch 'github-bot/gh-126'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-126'
git switch 'github-bot/gh-126'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-126'
git switch 'github-bot/gh-126'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-126'
git switch 'main'
git merge --squash 'github-bot/gh-126'
git switch 'main'
git merge --ff-only 'github-bot/gh-126'
git switch 'main'
git merge 'github-bot/gh-126'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.