[PATCH] D38542: [test] Fix append_path in the empty case
Francis Ricci via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 4 10:32:15 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL314915: [test] Fix append_path in the empty case (authored by fjricci).
Repository:
rL LLVM
https://reviews.llvm.org/D38542
Files:
llvm/trunk/utils/lit/lit/llvm/config.py
Index: llvm/trunk/utils/lit/lit/llvm/config.py
===================================================================
--- llvm/trunk/utils/lit/lit/llvm/config.py
+++ llvm/trunk/utils/lit/lit/llvm/config.py
@@ -107,9 +107,13 @@
def norm(x):
return os.path.normcase(os.path.normpath(x))
- current_paths = self.config.environment.get(variable, "")
- current_paths = current_paths.split(os.path.pathsep)
- paths = [norm(p) for p in current_paths]
+ current_paths = self.config.environment.get(variable, None)
+ if current_paths:
+ current_paths = current_paths.split(os.path.pathsep)
+ paths = [norm(p) for p in current_paths]
+ else:
+ paths = []
+
# If we are passed a list [a b c], then iterating this list forwards
# and adding each to the beginning would result in b c a. So we
# need to iterate in reverse to end up with the original ordering.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38542.117695.patch
Type: text/x-patch
Size: 1026 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171004/bce10549/attachment.bin>
More information about the llvm-commits
mailing list