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

Open
LANgmas wants to merge 1 commit from upstream-pr/1181 into main
LANgmas commented 2026-11-24 12:54:13 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by LANgmas on 2026-11-24T12:54:13Z.


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.
<!-- greyfinch-sync:ivall/xcl:issue:5472532846 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1181). Originally posted by [LANgmas](https://github.com/LANgmas) on 2026-11-24T12:54:13Z. --- 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.
DavidM1911 commented 2026-11-24 14:06:28 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T13:11:29Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7132477102 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1181#issuecomment-7132477102). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T13:11:29Z. --- 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.
github-actions[bot] commented 2026-11-28 08:00:22 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-28T08:00:22Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7236299555 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1181#issuecomment-7236299555). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-28T08:00:22Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
Foniass commented 2026-12-01 05:01:00 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T05:01:00Z.


Triage (#1607) – head 98ca092

No open or merged PR makes the same change (#2489 only reformats the debug-layer SKIPPED lines in e2e.rs). The skipped helper writes straight to std::io::stderr(), which libtest does not capture, the same way texture_states.rs does on main, and scripts/test.ps1 counts no XCL_SAMPLE_* skips apart from GPU skips.
Minor: gpu_pso_e2e.rs::setup now prints both the old println! line and the new SKIPPED line; the helper is copied into five files. The branch conflicts with main (scripts/test.ps1 changed there).
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7301336261 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1181#issuecomment-7301336261). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T05:01:00Z. --- **Triage (#1607)** – head 98ca092 No open or merged PR makes the same change (#2489 only reformats the debug-layer SKIPPED lines in `e2e.rs`). The `skipped` helper writes straight to `std::io::stderr()`, which libtest does not capture, the same way `texture_states.rs` does on main, and `scripts/test.ps1` counts `no XCL_SAMPLE_*` skips apart from GPU skips. Minor: `gpu_pso_e2e.rs::setup` now prints both the old `println!` line and the new SKIPPED line; the helper is copied into five files. The branch conflicts with main (`scripts/test.ps1` changed there). Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1181:upstream-pr/1181'
git switch 'upstream-pr/1181'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/1181'
git switch 'upstream-pr/1181'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1181'
git switch 'upstream-pr/1181'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1181'
git switch 'main'
git merge --squash 'upstream-pr/1181'
git switch 'main'
git merge --ff-only 'upstream-pr/1181'
git switch 'main'
git merge 'upstream-pr/1181'
git push origin 'main'
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
xcl-dev/xcl!1172
No description provided.