[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.
This commit is contained in:
Tomohiro Kashiwada 2025-10-21 05:14:19 +09:00 committed by GitHub
parent c318f82a4a
commit d4af5e6b0b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 6 additions and 6 deletions

View file

@ -19,7 +19,7 @@ config.parallelism_group = "clangd"
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"

View file

@ -11,7 +11,7 @@ import platform
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"

View file

@ -21,7 +21,7 @@ config.test_format = lit.formats.GoogleTest(".", "Tests")
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"

View file

@ -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"

View file

@ -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]
)

View file

@ -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'