[Lldb-commits] [lldb] 8941f89 - [lldb] Transfer some environment variables into the tests on Windows build host (#115613)
via lldb-commits
lldb-commits at lists.llvm.org
Mon Nov 11 06:14:27 PST 2024
Author: Dmitry Vasilyev
Date: 2024-11-11T18:14:22+04:00
New Revision: 8941f898f1921857720034b9a0950e4ec32d5d87
URL: https://github.com/llvm/llvm-project/commit/8941f898f1921857720034b9a0950e4ec32d5d87
DIFF: https://github.com/llvm/llvm-project/commit/8941f898f1921857720034b9a0950e4ec32d5d87.diff
LOG: [lldb] Transfer some environment variables into the tests on Windows build host (#115613)
Some API tests (compiler calls) create a lot of garbage and cause
unexpected behavior in case of Windows host and Linux target, e.g.
```
lldb/test/API/commands/process/attach/%SystemDrive%/
lldb/test/API/functionalities/deleted-executable/%SystemDrive%/
lldb/test/API/functionalities/exec/%SystemDrive%/
lldb/test/API/functionalities/load_unload/%SystemDrive%/
lldb/test/API/functionalities/target-new-solib-notifications/%SystemDrive%/
lldb/test/API/functionalities/thread/create_after_attach/%SystemDrive%/
```
It can be fixed by transfer some standard Windows environment variables
into API tests.
Added:
Modified:
lldb/test/API/lit.cfg.py
Removed:
################################################################################
diff --git a/lldb/test/API/lit.cfg.py b/lldb/test/API/lit.cfg.py
index 6ef09f36a1907e..06c685ebc3f5a5 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]
More information about the lldb-commits
mailing list