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

Closed
Convicts42 wants to merge 1 commit from upstream-pr/2331 into main
Convicts42 commented 2026-11-25 14:57:27 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Convicts42 on 2026-11-25T14:57:27Z.


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

<!-- greyfinch-sync:ivall/xcl:issue:5493770543 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2331). Originally posted by [Convicts42](https://github.com/Convicts42) on 2026-11-25T14:57:27Z. --- 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)
nnonno91 commented 2026-11-25 15:08:10 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by nnonno91 on 2026-11-25T15:06:55Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7166325193 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2331#issuecomment-7166325193). Originally posted by [nnonno91](https://github.com/nnonno91) on 2026-11-25T15:06:55Z. --- 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.
upstream-sync closed this pull request 2026-11-25 17:06:53 +00:00
DavidM1911 commented 2026-11-25 18:04:49 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T18:04:40Z.


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!

<!-- greyfinch-sync:ivall/xcl:comment:7170405681 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2331#issuecomment-7170405681). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T18:04:40Z. --- 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

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!2321
No description provided.