https://github.com/vvereschaka created 
https://github.com/llvm/llvm-project/pull/93366

These environment variables avoid some side effects during execution of the 
remote API tests on Windows platform.

One of the side effect is a creating of weird folders, such as 
`<test-root-dir>\%SystemDrive%\...`, within the test directory.

>From 5f79f5fbf6679da020266d655ced91389215d851 Mon Sep 17 00:00:00 2001
From: Vladimir Vereschaka <vveresch...@accesssoftek.com>
Date: Fri, 24 May 2024 20:19:54 -0700
Subject: [PATCH] [lldb][tests] Transfer some environment variables into API
 tests on Windows platform.

These environment variables avoid some side effects during execution of the 
remote API tests
on Windows platform.

One of the side effect is a creating of weird folders, such as 
<test-root-dir>\%SystemDrive%\...,
within the test directory.
---
 lldb/test/API/lit.cfg.py | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/lldb/test/API/lit.cfg.py b/lldb/test/API/lit.cfg.py
index d934349fe3ca3..7d38ee0ec098c 100644
--- a/lldb/test/API/lit.cfg.py
+++ b/lldb/test/API/lit.cfg.py
@@ -313,3 +313,22 @@ 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",
+        "SystemRoot",
+        "ALLUSERSPROFILE",
+        "APPDATA",
+        "LOCALAPPDATA",
+        "USERDNSDOMAIN",
+        "USERDOMAIN",
+        "USERNAME",
+        "USERPROFILE",
+        "USERDOMAIN_ROAMINGPROFILE",
+        "COMPUTERNAME",
+        "ProgramData",
+    ]:
+        if v in os.environ:
+            config.environment[v] = os.environ[v]

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to