Tests: report missing XCL_SAMPLE_* data as SKIPPED instead of silently passing #1181

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

@⁠LANgmas on GitHub · 2026-11-24 12:54 UTC · original
LANgmas:sample-data-skip-reporting → main · +59 −5 · 6 files · 1 commits · open

Follow-up to the skip-visibility discussion in #42, complementary to the GPU-capability reporting implemented by #51.
Sample-data-gated tests in crates/xcl/tests/ can return before exercising their intended checks when the corresponding XCL_SAMPLE_* variable is unset. On the tested RTX 3050 configuration, 29 such tests were counted as ok without exercising their sample-data paths or producing visible per-test SKIPPED annotations.
This change:

  • Writes SKIPPED <test>: no XCL_SAMPLE_* directly to stderr for each missing-data gate.
  • Reports each affected test individually, outside the OnceLock-cached setup helpers.
  • Adds a separate sample-data skip summary in scripts/test.ps1, keeping these skips distinct from GPU-capability skips.
  • Preserves XCL_REQUIRE_GPU behavior: missing sample data is not a GPU capability failure.
  • Leaves intentional error-path tests and ignored print helpers unchanged.
    This is reporting, not native libtest skip status: the Rust test harness still reports normally returning tests as ok; the stderr annotations and PowerShell summary make the unexecuted sample-data paths explicit.
    Tested
    Windows 11 build 26300, NVIDIA RTX 3050 Laptop (driver 617.14), DXC 1.9.2602.17.
  • cargo build --workspace: PASS.
  • Five focused test binaries: PASS.
  • scripts/test.ps1: exit code 0.
  • 29 sample-data skips reported separately: 13 DLLS, 6 RPF, 6 XG, 3 DXC and 1 BCPACK.
  • 2 GPU-capability skips reported separately.
  • A fake XCL_SAMPLE_BCPACK input entered the real decode path and failed meaningfully.
    Not tested
  • Successful execution with genuine game sample data; no suitable sample data was available.
  • Successful execution of the sample-data paths using genuine game files.
  • Native dynamic libtest skip status; this change uses stderr annotations and wrapper summaries instead.
  • Retail-game smoke testing; no runtime source files were changed.
    AI use
    Implemented with Devin using SWE-2 Max as the AI coding model. Build and test commands were executed on the contributor's Windows machine, and the results were reviewed against the local logs.
**@⁠LANgmas** on GitHub · 2026-11-24 12:54 UTC · [original](https://github.com/xcl-dev/xcl/pull/1181) `LANgmas:sample-data-skip-reporting` → `main` · +59 −5 · 6 files · 1 commits · open Follow-up to the skip-visibility discussion in #42, complementary to the GPU-capability reporting implemented by #51. Sample-data-gated tests in `crates/xcl/tests/` can return before exercising their intended checks when the corresponding `XCL_SAMPLE_*` variable is unset. On the tested RTX 3050 configuration, 29 such tests were counted as `ok` without exercising their sample-data paths or producing visible per-test SKIPPED annotations. This change: - Writes `SKIPPED <test>: no XCL_SAMPLE_*` directly to stderr for each missing-data gate. - Reports each affected test individually, outside the `OnceLock`-cached setup helpers. - Adds a separate sample-data skip summary in `scripts/test.ps1`, keeping these skips distinct from GPU-capability skips. - Preserves `XCL_REQUIRE_GPU` behavior: missing sample data is not a GPU capability failure. - Leaves intentional error-path tests and ignored print helpers unchanged. This is reporting, not native libtest skip status: the Rust test harness still reports normally returning tests as `ok`; the stderr annotations and PowerShell summary make the unexecuted sample-data paths explicit. **Tested** Windows 11 build 26300, NVIDIA RTX 3050 Laptop (driver 617.14), DXC 1.9.2602.17. - `cargo build --workspace`: PASS. - Five focused test binaries: PASS. - `scripts/test.ps1`: exit code 0. - 29 sample-data skips reported separately: 13 DLLS, 6 RPF, 6 XG, 3 DXC and 1 BCPACK. - 2 GPU-capability skips reported separately. - A fake `XCL_SAMPLE_BCPACK` input entered the real decode path and failed meaningfully. **Not tested** - Successful execution with genuine game sample data; no suitable sample data was available. - Successful execution of the sample-data paths using genuine game files. - Native dynamic libtest skip status; this change uses stderr annotations and wrapper summaries instead. - Retail-game smoke testing; no runtime source files were changed. **AI use** Implemented with Devin using SWE-2 Max as the AI coding model. Build and test commands were executed on the contributor's Windows machine, and the results were reviewed against the local logs.
Sample-data-gated tests in crates/xcl/tests/ return early when their
XCL_SAMPLE_* variable is unset, counting as ok without exercising their
paths and without a visible per-test annotation (29 on a machine with no
sample data). Write SKIPPED <test>: no XCL_SAMPLE_* to stderr for each
missing-data gate, reported per test outside the OnceLock-cached helpers,
and summarize sample-data skips separately from GPU-capability skips in
scripts/test.ps1. XCL_REQUIRE_GPU is unchanged: missing data is not a GPU
capability failure.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:46:16 +00:00
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-24 13:11 UTC · original

Independent verification on current main 384f7f7 (branch already contains it — clean).

Machine: Windows 11, Ryzen 9 7900X; Rust stable MSVC, debug.

  • cargo test -p xcl --test xg_oracle: 6 passed, 0 failed, 12 ignored — the sample-gated print_*/texel_* tests now emit SKIPPED <test>: no XCL_SAMPLE_XG on stderr (visible in the run output) instead of silently passing; scripts/test.ps1 already summarizes those lines.
  • The same skipped() helper is applied consistently across bcpack_parity, console_dlls_e2e, console_shaders and gpu_pso_e2e.

AI use: test runs by Devin (Cognition, SWE-2); no code changes.

**@⁠DavidM1911** on GitHub · 2026-11-24 13:11 UTC · [original](https://github.com/xcl-dev/xcl/pull/1181#issuecomment-7132477102) Independent verification on current `main` `384f7f7` (branch already contains it — clean). **Machine:** Windows 11, Ryzen 9 7900X; Rust stable MSVC, debug. - `cargo test -p xcl --test xg_oracle`: **6 passed, 0 failed, 12 ignored** — the sample-gated `print_*`/`texel_*` tests now emit `SKIPPED <test>: no XCL_SAMPLE_XG` on stderr (visible in the run output) instead of silently passing; `scripts/test.ps1` already summarizes those lines. - The same `skipped()` helper is applied consistently across `bcpack_parity`, `console_dlls_e2e`, `console_shaders` and `gpu_pso_e2e`. AI use: test runs by Devin (Cognition, SWE-2); no code changes.
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/1181/head:github-bot/gh-1181'
git switch 'github-bot/gh-1181'

Merge

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