[PATCH] D57343: lit: Let lit.util.which() return a normcase()ed path
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 30 16:41:28 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL352704: lit: Let lit.util.which() return a normcase()ed path (authored by nico, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D57343?vs=183912&id=184408#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57343/new/
https://reviews.llvm.org/D57343
Files:
llvm/trunk/utils/lit/lit/util.py
Index: llvm/trunk/utils/lit/lit/util.py
===================================================================
--- llvm/trunk/utils/lit/lit/util.py
+++ llvm/trunk/utils/lit/lit/util.py
@@ -197,7 +197,7 @@
# Check for absolute match first.
if os.path.isabs(command) and os.path.isfile(command):
- return os.path.normpath(command)
+ return os.path.normcase(os.path.normpath(command))
# Would be nice if Python had a lib function for this.
if not paths:
@@ -215,7 +215,7 @@
for ext in pathext:
p = os.path.join(path, command + ext)
if os.path.exists(p) and not os.path.isdir(p):
- return os.path.normpath(p)
+ return os.path.normcase(os.path.normpath(p))
return None
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57343.184408.patch
Type: text/x-patch
Size: 773 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190131/e116980a/attachment.bin>
More information about the llvm-commits
mailing list