[polly] d4af5e6 - [Unittest][Cygwin] Set $PATH when running unittests (#163947)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 20 13:14:24 PDT 2025
Author: Tomohiro Kashiwada
Date: 2025-10-20T23:14:19+03:00
New Revision: d4af5e6b0b4fef49c3277d4a13d279dfcc4e155a
URL: https://github.com/llvm/llvm-project/commit/d4af5e6b0b4fef49c3277d4a13d279dfcc4e155a
DIFF: https://github.com/llvm/llvm-project/commit/d4af5e6b0b4fef49c3277d4a13d279dfcc4e155a.diff
LOG: [Unittest][Cygwin] Set $PATH when running unittests (#163947)
As the Cygwin platform requires $PATH to be set in order to run
unittests, do the same as for the regular Windows target.
Added:
Modified:
clang-tools-extra/clangd/unittests/lit.cfg.py
clang-tools-extra/include-cleaner/test/Unit/lit.cfg.py
clang-tools-extra/test/Unit/lit.cfg.py
clang/test/Unit/lit.cfg.py
llvm/utils/lit/tests/Inputs/googletest-cmd-wrapper/lit.cfg
polly/test/Unit/lit.cfg
Removed:
################################################################################
diff --git a/clang-tools-extra/clangd/unittests/lit.cfg.py b/clang-tools-extra/clangd/unittests/lit.cfg.py
index 33aa9e61f4ce9..4c3f0f028acdd 100644
--- a/clang-tools-extra/clangd/unittests/lit.cfg.py
+++ b/clang-tools-extra/clangd/unittests/lit.cfg.py
@@ -19,7 +19,7 @@
if platform.system() == "Darwin":
shlibpath_var = "DYLD_LIBRARY_PATH"
-elif platform.system() == "Windows":
+elif platform.system() == "Windows" or sys.platform == "cygwin":
shlibpath_var = "PATH"
else:
shlibpath_var = "LD_LIBRARY_PATH"
diff --git a/clang-tools-extra/include-cleaner/test/Unit/lit.cfg.py b/clang-tools-extra/include-cleaner/test/Unit/lit.cfg.py
index 0963351abe3b1..010d28e036f83 100644
--- a/clang-tools-extra/include-cleaner/test/Unit/lit.cfg.py
+++ b/clang-tools-extra/include-cleaner/test/Unit/lit.cfg.py
@@ -11,7 +11,7 @@
if platform.system() == "Darwin":
shlibpath_var = "DYLD_LIBRARY_PATH"
-elif platform.system() == "Windows":
+elif platform.system() == "Windows" or sys.platform == "cygwin":
shlibpath_var = "PATH"
else:
shlibpath_var = "LD_LIBRARY_PATH"
diff --git a/clang-tools-extra/test/Unit/lit.cfg.py b/clang-tools-extra/test/Unit/lit.cfg.py
index b7376a02c89e1..0254829ed67e4 100644
--- a/clang-tools-extra/test/Unit/lit.cfg.py
+++ b/clang-tools-extra/test/Unit/lit.cfg.py
@@ -21,7 +21,7 @@
if platform.system() == "Darwin":
shlibpath_var = "DYLD_LIBRARY_PATH"
-elif platform.system() == "Windows":
+elif platform.system() == "Windows" or sys.platform == "cygwin":
shlibpath_var = "PATH"
else:
shlibpath_var = "LD_LIBRARY_PATH"
diff --git a/clang/test/Unit/lit.cfg.py b/clang/test/Unit/lit.cfg.py
index 37e91d0f8629f..ebe35a10e7f30 100644
--- a/clang/test/Unit/lit.cfg.py
+++ b/clang/test/Unit/lit.cfg.py
@@ -51,7 +51,7 @@ def find_shlibpath_var():
yield "LD_LIBRARY_PATH"
elif platform.system() == "Darwin":
yield "DYLD_LIBRARY_PATH"
- elif platform.system() == "Windows":
+ elif platform.system() == "Windows" or sys.platform == "cygwin":
yield "PATH"
elif platform.system() == "AIX":
yield "LIBPATH"
diff --git a/llvm/utils/lit/tests/Inputs/googletest-cmd-wrapper/lit.cfg b/llvm/utils/lit/tests/Inputs/googletest-cmd-wrapper/lit.cfg
index 9f93bac51456d..d3eb987922995 100644
--- a/llvm/utils/lit/tests/Inputs/googletest-cmd-wrapper/lit.cfg
+++ b/llvm/utils/lit/tests/Inputs/googletest-cmd-wrapper/lit.cfg
@@ -2,5 +2,5 @@ import lit.formats
config.name = "googletest-cmd-wrapper"
config.test_format = lit.formats.GoogleTest(
- "DummySubDir", "Test" if "win32" in sys.platform else ".exe", [sys.executable]
+ "DummySubDir", "Test" if sys.platform in ["win32", "cygwin"] else ".exe", [sys.executable]
)
diff --git a/polly/test/Unit/lit.cfg b/polly/test/Unit/lit.cfg
index 6c450fbc54b5a..21d7bc4ab25c5 100644
--- a/polly/test/Unit/lit.cfg
+++ b/polly/test/Unit/lit.cfg
@@ -50,7 +50,7 @@ for var in [
if platform.system() == 'Darwin':
shlibpath_var = 'DYLD_LIBRARY_PATH'
-elif platform.system() == 'Windows':
+elif platform.system() == 'Windows' or sys.platform == "cygwin":
shlibpath_var = 'PATH'
else:
shlibpath_var = 'LD_LIBRARY_PATH'
More information about the llvm-commits
mailing list