Skip to content

Commit 8941f89

Browse files
authored
[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.
1 parent 5ea852e commit 8941f89

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lldb/test/API/lit.cfg.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,3 +334,9 @@ def delete_module_cache(path):
334334
# Propagate XDG_CACHE_HOME
335335
if "XDG_CACHE_HOME" in os.environ:
336336
config.environment["XDG_CACHE_HOME"] = os.environ["XDG_CACHE_HOME"]
337+
338+
# Transfer some environment variables into the tests on Windows build host.
339+
if platform.system() == "Windows":
340+
for v in ["SystemDrive"]:
341+
if v in os.environ:
342+
config.environment[v] = os.environ[v]

0 commit comments

Comments
 (0)