From 4af681c754cbb89b1e10f3c7ace2b30a0282400e Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Fri, 6 Nov 2026 18:43:05 +0100 Subject: [PATCH] fix: clear the XDG folders for the test suite The CI runner sets XDG_CONFIG_HOME to its own home, and the installer now reads it as RetroArch does. Tests that fake HOME then found the runner's RetroArch folders. The suite clears the three XDG variables it reads, and a test that exercises one sets it itself. --- tests/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/__init__.py b/tests/__init__.py index 1540b4305..bffe7a05f 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -17,6 +17,12 @@ import tempfile from pathlib import Path os.environ.setdefault("RETROBIOS_OFFLINE", "1") +# The installer reads the XDG base directories as RetroArch and the +# emulators do. The CI runner sets XDG_CONFIG_HOME to its own home, so tests +# that fake HOME found the runner's folders instead of theirs. A test that +# exercises one of them sets it for itself. +for _name in ("XDG_CONFIG_HOME", "XDG_DATA_HOME", "XDG_CACHE_HOME"): + os.environ.pop(_name, None) # A test never waits on, nor blocks, the measurements running on the host. os.environ.setdefault( "RETROBIOS_PROBE_LOCK",