[PATCH] D19757: [lit] Add %:[STpst] to represent paths without Windows drive letters.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 29 18:37:23 PDT 2016
ruiu updated this revision to Diff 55697.
ruiu added a comment.
- Update as per Reid's comment.
http://reviews.llvm.org/D19757
Files:
utils/lit/lit/TestRunner.py
Index: utils/lit/lit/TestRunner.py
===================================================================
--- utils/lit/lit/TestRunner.py
+++ utils/lit/lit/TestRunner.py
@@ -568,6 +568,24 @@
('%/t', tmpBase.replace('\\', '/') + '.tmp'),
('%/T', tmpDir.replace('\\', '/')),
])
+
+ # "%:[STpst]" are paths without Windows drive letters.
+ if kIsWindows:
+ substitutions.extend([
+ ('%:s', re.sub(r'^(.):', r'\1', sourcepath)),
+ ('%:S', re.sub(r'^(.):', r'\1', sourcedir)),
+ ('%:p', re.sub(r'^(.):', r'\1', sourcedir)),
+ ('%:t', re.sub(r'^(.):', r'\1', tmpBase) + '.tmp'),
+ ('%:T', re.sub(r'^(.):', r'\1', tmpDir)),
+ ])
+ else:
+ substitutions.extend([
+ ('%:s', sourcepath),
+ ('%:S', sourcedir),
+ ('%:p', sourcedir),
+ ('%:t', tmpBase + '.tmp'),
+ ('%:T', tmpDir),
+ ])
return substitutions
def applySubstitutions(script, substitutions):
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19757.55697.patch
Type: text/x-patch
Size: 1090 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160430/c658ead3/attachment.bin>
More information about the llvm-commits
mailing list