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",