Skip to content

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

Closed
Convicts42 wants to merge 1 commit into
xcl-dev:mainfrom
Convicts42:tests/launcher-data-root
Closed

Convicts42 wants to merge 1 commit into
xcl-dev:mainfrom
Convicts42:tests/launcher-data-root

Conversation

@Convicts42

Copy link
Copy Markdown

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 (DXIL GPU fuzz tests reproducibly fail with E_OUTOFMEMORY on RTX 5060 #1905, fixed by Recompiler: LDS ds_sub_u32 hides its negation from the driver (RTX 50 refuses it) #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

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

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 <noreply@anthropic.com>
@Convicts42
Convicts42 marked this pull request as ready for review November 25, 2026 14:58
@nnonno91

Copy link
Copy Markdown

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.

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants