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

Closed
fladit123 wants to merge 0 commits from upstream-pr/126 into main
fladit123 commented 2026-11-26 17:32:34 +00:00 (Migrated from github.com)

Imported from uiliannn/VItoriaBr. Originally posted by fladit123 on 2026-11-26T17:32:34Z.


🇧🇷 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.

<!-- greyfinch-sync:uiliannn/VItoriaBr:issue:5514583379 --> Imported from [uiliannn/VItoriaBr](https://github.com/uiliannn/VitoriaBr2.0/pull/126). Originally posted by [fladit123](https://github.com/fladit123) on 2026-11-26T17:32:34Z. --- ## 🇧🇷 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.

Pull request closed

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
uiliannn/VItoriaBr!126
No description provided.