[PATCH] D19757: [lit] Add %:[STpst] to represent paths without Windows drive letters.

Filipe Cabecinhas via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 30 03:38:57 PDT 2016


It's not without drive letters anymore. It's without the "initial" colon.

Do Windows paths starting with // (or \\, I never remember) have any colons
somewhere?

Please remember to also change the commit message.

LGTM


On Saturday, 30 April 2016, Rui Ueyama via llvm-commits <
llvm-commits at lists.llvm.org
<javascript:_e(%7B%7D,'cvml','llvm-commits at lists.llvm.org');>> wrote:

> 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):
>
>
>

-- 
  F
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160430/e14bd78e/attachment.html>


More information about the llvm-commits mailing list