Skip to content

Commit 1952c85

Browse files
kikairoyaaokblast
authored andcommitted
[Unittest][Cygwin] Set $PATH when running unittests (llvm#163947)
As the Cygwin platform requires $PATH to be set in order to run unittests, do the same as for the regular Windows target.
1 parent 87a08c8 commit 1952c85

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

clang-tools-extra/clangd/unittests/lit.cfg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
if platform.system() == "Darwin":
2121
shlibpath_var = "DYLD_LIBRARY_PATH"
22-
elif platform.system() == "Windows":
22+
elif platform.system() == "Windows" or sys.platform == "cygwin":
2323
shlibpath_var = "PATH"
2424
else:
2525
shlibpath_var = "LD_LIBRARY_PATH"

clang-tools-extra/include-cleaner/test/Unit/lit.cfg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
if platform.system() == "Darwin":
1313
shlibpath_var = "DYLD_LIBRARY_PATH"
14-
elif platform.system() == "Windows":
14+
elif platform.system() == "Windows" or sys.platform == "cygwin":
1515
shlibpath_var = "PATH"
1616
else:
1717
shlibpath_var = "LD_LIBRARY_PATH"

clang-tools-extra/test/Unit/lit.cfg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
if platform.system() == "Darwin":
2323
shlibpath_var = "DYLD_LIBRARY_PATH"
24-
elif platform.system() == "Windows":
24+
elif platform.system() == "Windows" or sys.platform == "cygwin":
2525
shlibpath_var = "PATH"
2626
else:
2727
shlibpath_var = "LD_LIBRARY_PATH"

clang/test/Unit/lit.cfg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def find_shlibpath_var():
5151
yield "LD_LIBRARY_PATH"
5252
elif platform.system() == "Darwin":
5353
yield "DYLD_LIBRARY_PATH"
54-
elif platform.system() == "Windows":
54+
elif platform.system() == "Windows" or sys.platform == "cygwin":
5555
yield "PATH"
5656
elif platform.system() == "AIX":
5757
yield "LIBPATH"

llvm/utils/lit/tests/Inputs/googletest-cmd-wrapper/lit.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ import lit.formats
22

33
config.name = "googletest-cmd-wrapper"
44
config.test_format = lit.formats.GoogleTest(
5-
"DummySubDir", "Test" if "win32" in sys.platform else ".exe", [sys.executable]
5+
"DummySubDir", "Test" if sys.platform in ["win32", "cygwin"] else ".exe", [sys.executable]
66
)

polly/test/Unit/lit.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ for var in [
5050

5151
if platform.system() == 'Darwin':
5252
shlibpath_var = 'DYLD_LIBRARY_PATH'
53-
elif platform.system() == 'Windows':
53+
elif platform.system() == 'Windows' or sys.platform == "cygwin":
5454
shlibpath_var = 'PATH'
5555
else:
5656
shlibpath_var = 'LD_LIBRARY_PATH'

0 commit comments

Comments
 (0)