Skip to content

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

Open
LANgmas wants to merge 1 commit into
xcl-dev:mainfrom
LANgmas:sample-data-skip-reporting
Open

LANgmas wants to merge 1 commit into
xcl-dev:mainfrom
LANgmas:sample-data-skip-reporting

Conversation

@LANgmas

@LANgmas LANgmas commented Nov 24, 2026 •

Copy link
Copy Markdown

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.

…y passing

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>
@DavidM1911

Copy link
Copy Markdown
Contributor

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.

@ivall ivall added the off-goal Does not bear on the current goal (world loading); waits until it is reached label Nov 24, 2026
@github-actions

Copy link
Copy Markdown

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.

@github-actions github-actions Bot added the stale No activity for 3 days; closed 4 days later unless something happens label Nov 28, 2026
@Foniass

Foniass commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

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.

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 stale No activity for 3 days; closed 4 days later unless something happens

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants