diff --git a/lldb/test/API/lit.cfg.py b/lldb/test/API/lit.cfg.py index 6ef09f36a1907..06c685ebc3f5a 100644 --- a/lldb/test/API/lit.cfg.py +++ b/lldb/test/API/lit.cfg.py @@ -334,3 +334,9 @@ def delete_module_cache(path): # Propagate XDG_CACHE_HOME if "XDG_CACHE_HOME" in os.environ: config.environment["XDG_CACHE_HOME"] = os.environ["XDG_CACHE_HOME"] + +# Transfer some environment variables into the tests on Windows build host. +if platform.system() == "Windows": + for v in ["SystemDrive"]: + if v in os.environ: + config.environment[v] = os.environ[v]