Tests: keep the launcher tests' data out of the user's XCL folder #2331

Closed
github-bot wants to merge 1 commit from gh-pr/2331/head into gh-pr/2331/base
Owner

@⁠Convicts42 on GitHub · 2026-11-25 14:57 UTC · original
tests/launcher-data-root → main · +19 −16 · 1 files · 1 commits · closed without merging

Three of the launcher integration tests (#1963) run xcl run <folder> without XCL_DATA_ROOT. The launcher writes the title's xcl.toml before it looks for an executable, so every run of the suite leaves three folders (xcl-no-exe-*, xcl-multi-exe-*, xcl-self-copy-*) in the user's %LOCALAPPDATA%\XCL, next to their real titles. 20 runs had left 60 on this machine.

What is in it

  • crates/xcl/tests/launcher_e2e.rs: the three tests run xcl through one helper that sets XCL_DATA_ROOT to a folder next to the test's game folder, removed with it. The helper asserts that the title's xcl.toml is there, so a test that loses its data root fails. The other three tests exit before anything is written and are unchanged.

Tested

  • NVIDIA GeForce RTX 5060 Ti 16 GB (32-lane waves), driver 621.24 (32.0.16.2124); Core i7-14700K; Windows 11 Pro 26300; Rust 1.100.0 MSVC; DXC 1.9.2602.17 (Windows SDK 10.0.26100.0); debug; on main 06c9f55
  • cargo test -p xcl --test launcher_e2e -- --test-threads=4, with LOCALAPPDATA pointed at an empty folder: before, 6 passed and 3 folders left in XCL; with this PR, 6 passed in 5 of 5 runs and nothing left. With the .env("XCL_DATA_ROOT", …) line removed from the helper: 3 passed, 3 failed
  • cargo test --workspace --no-fail-fast -- --test-threads=4: 1261 passed, 4 failed, 46 ignored, the same as main 06c9f55 here. The 4 are fuzz_validate_and_gpu_0 to _3 (#1905, fixed by #1919)
  • SKIPPED (26): 21 no wave64, 3 per-lane form refused (V_MUL_F16, V_PK_MUL_F16, V_CVT_F16_F32), 1 no heap windows, 1 driver cache without Windows Developer Mode

Regression run

  • not needed: only a test file changes, nothing in crates/xcl/src

Not tested

  • AMD, Linux / Wine, the release profile
  • #1173 adds a launcher_e2e.rs of its own and already conflicts with main; it sets XCL_DATA_ROOT itself

AI use

  • Claude Code with Claude Opus 5.5: found the leftover folders, wrote the change and this description, and ran the tests on the machine named above

🤖 Generated with Claude Code

**@⁠Convicts42** on GitHub · 2026-11-25 14:57 UTC · [original](https://github.com/xcl-dev/xcl/pull/2331) `tests/launcher-data-root` → `main` · +19 −16 · 1 files · 1 commits · closed without merging Three of the launcher integration tests (#1963) run `xcl run <folder>` without `XCL_DATA_ROOT`. The launcher writes the title's `xcl.toml` before it looks for an executable, so every run of the suite leaves three folders (`xcl-no-exe-*`, `xcl-multi-exe-*`, `xcl-self-copy-*`) in the user's `%LOCALAPPDATA%\XCL`, next to their real titles. 20 runs had left 60 on this machine. **What is in it** - `crates/xcl/tests/launcher_e2e.rs`: the three tests run `xcl` through one helper that sets `XCL_DATA_ROOT` to a folder next to the test's game folder, removed with it. The helper asserts that the title's `xcl.toml` is there, so a test that loses its data root fails. The other three tests exit before anything is written and are unchanged. **Tested** - NVIDIA GeForce RTX 5060 Ti 16 GB (32-lane waves), driver 621.24 (32.0.16.2124); Core i7-14700K; Windows 11 Pro 26300; Rust 1.100.0 MSVC; DXC 1.9.2602.17 (Windows SDK 10.0.26100.0); debug; on `main` `06c9f55` - `cargo test -p xcl --test launcher_e2e -- --test-threads=4`, with `LOCALAPPDATA` pointed at an empty folder: before, 6 passed and 3 folders left in `XCL`; with this PR, 6 passed in 5 of 5 runs and nothing left. With the `.env("XCL_DATA_ROOT", …)` line removed from the helper: 3 passed, 3 failed - `cargo test --workspace --no-fail-fast -- --test-threads=4`: 1261 passed, 4 failed, 46 ignored, the same as `main` `06c9f55` here. The 4 are `fuzz_validate_and_gpu_0` to `_3` (#1905, fixed by #1919) - SKIPPED (26): 21 no wave64, 3 per-lane form refused (`V_MUL_F16`, `V_PK_MUL_F16`, `V_CVT_F16_F32`), 1 no heap windows, 1 driver cache without Windows Developer Mode **Regression run** - not needed: only a test file changes, nothing in `crates/xcl/src` **Not tested** - AMD, Linux / Wine, the release profile - #1173 adds a `launcher_e2e.rs` of its own and already conflicts with `main`; it sets `XCL_DATA_ROOT` itself **AI use** - Claude Code with Claude Opus 5.5: found the leftover folders, wrote the change and this description, and ran the tests on the machine named above 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Three launcher tests run `xcl run <folder>` without XCL_DATA_ROOT. The
launcher writes the title's xcl.toml before it looks for an executable,
so every run of the suite left three folders (xcl-no-exe-*,
xcl-multi-exe-*, xcl-self-copy-*) in the user's %LOCALAPPDATA%\XCL.

They now run through one helper that gives XCL a data root next to the
test's game folder, removed with it, and asserts that the title's
xcl.toml is there: without the data root the three tests fail. The other
three exit before anything is written.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:27:46 +00:00
github-bot closed this pull request 2026-11-26 05:27:47 +00:00
Author
Owner

@⁠nnonno91 on GitHub · 2026-11-25 15:06 UTC · original

Independent Windows check of 7419c2610495bd56c236b02d1aa4d4f2b500e36a with an inherited XCL profile containing an existing title.

Tested

  • Windows 11 25H2 build 26200.9974, Ryzen 7 9800X3D, Rust 1.100.0 MSVC, unoptimized profile. Launcher-only tests, no GPU coverage.
  • Set the parent process's XCL_DATA_ROOT to a temporary directory containing an existing title folder and a sentinel xcl.toml. Ran cargo test --locked -p xcl --test launcher_e2e -- --nocapture --test-threads=4 three times. Each run gave 6 passed, 0 failed, 0 ignored and no skips.
  • After each run, the inherited data root still contained only the existing title folder, and its config SHA-256 was unchanged. The fixture also checked that each applicable child wrote its own per-test config.

Not tested

The unset-XCL_DATA_ROOT path separately, the parent, retail titles and the full workspace suite.

AI use

OpenAI Codex (GPT-6.2 Sol) ran the checks and wrote this report.

**@⁠nnonno91** on GitHub · 2026-11-25 15:06 UTC · [original](https://github.com/xcl-dev/xcl/pull/2331#issuecomment-7166325193) Independent Windows check of `7419c2610495bd56c236b02d1aa4d4f2b500e36a` with an inherited XCL profile containing an existing title. **Tested** - Windows 11 25H2 build 26200.9974, Ryzen 7 9800X3D, Rust 1.100.0 MSVC, unoptimized profile. Launcher-only tests, no GPU coverage. - Set the parent process's `XCL_DATA_ROOT` to a temporary directory containing an existing title folder and a sentinel `xcl.toml`. Ran `cargo test --locked -p xcl --test launcher_e2e -- --nocapture --test-threads=4` three times. Each run gave 6 passed, 0 failed, 0 ignored and no skips. - After each run, the inherited data root still contained only the existing title folder, and its config SHA-256 was unchanged. The fixture also checked that each applicable child wrote its own per-test config. **Not tested** The unset-`XCL_DATA_ROOT` path separately, the parent, retail titles and the full workspace suite. **AI use** OpenAI Codex (GPT-6.2 Sol) ran the checks and wrote this report.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 18:04 UTC · original

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 18:04 UTC · [original](https://github.com/xcl-dev/xcl/pull/2331#issuecomment-7170405681) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.