[llvm] r294586 - [docs] cleanup documentation on lit substitutions

Sean Silva via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 9 16:26:04 PST 2017


Thanks!

On Thu, Feb 9, 2017 at 6:12 AM, David Bozier via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Author: davidb
> Date: Thu Feb  9 08:12:30 2017
> New Revision: 294586
>
> URL: http://llvm.org/viewvc/llvm-project?rev=294586&view=rev
> Log:
> [docs] cleanup documentation on lit substitutions
>
> 1. Added missing substitutions to the documentation in
> docs/TestingGuide.rst
> 2. Modified docs/CommandGuide/lit.rst to only document the "base" set of
> substitutions and to refer the reader to docs/TestingGuide.rst for more
> detailed info on substitutions.
>
> Patch by bd1976llvm
>
> Differential Revision: https://reviews.llvm.org/D29281
>
>
> Modified:
>     llvm/trunk/docs/CommandGuide/lit.rst
>     llvm/trunk/docs/TestingGuide.rst
>
> Modified: llvm/trunk/docs/CommandGuide/lit.rst
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/
> CommandGuide/lit.rst?rev=294586&r1=294585&r2=294586&view=diff
> ============================================================
> ==================
> --- llvm/trunk/docs/CommandGuide/lit.rst (original)
> +++ llvm/trunk/docs/CommandGuide/lit.rst Thu Feb  9 08:12:30 2017
> @@ -379,7 +379,7 @@ PRE-DEFINED SUBSTITUTIONS
>  ~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>  :program:`lit` provides various patterns that can be used with the RUN
> command.
> -These are defined in TestRunner.py.
> +These are defined in TestRunner.py. The base set of substitutions are:
>
>   ========== ==============
>    Macro      Substitution
> @@ -391,17 +391,13 @@ These are defined in TestRunner.py.
>   %t         temporary file name unique to the test
>   %T         temporary directory unique to the test
>   %%         %
> - %/s        same as %s but replace all / with \\
> - %/S        same as %S but replace all / with \\
> - %/p        same as %p but replace all / with \\
> - %/t        same as %t but replace all / with \\
> - %/T        same as %T but replace all / with \\
>   ========== ==============
>
> -Further substitution patterns might be defined by each test module.
> -See the modules :ref:`local-configuration-files`.
> +Other substitutions are provided that are variations on this base set and
> +further substitution patterns can be defined by each test module. See the
> +modules :ref:`local-configuration-files`.
>
> -More information on the testing infrastucture can be found in the
> +More detailed information on substitutions can be found in the
>  :doc:`../TestingGuide`.
>
>  TEST RUN OUTPUT FORMAT
>
> Modified: llvm/trunk/docs/TestingGuide.rst
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/
> TestingGuide.rst?rev=294586&r1=294585&r2=294586&view=diff
> ============================================================
> ==================
> --- llvm/trunk/docs/TestingGuide.rst (original)
> +++ llvm/trunk/docs/TestingGuide.rst Thu Feb  9 08:12:30 2017
> @@ -468,6 +468,25 @@ RUN lines:
>
>     Expands to the path separator, i.e. ``:`` (or ``;`` on Windows).
>
> +``%/s, %/S, %/t, %/T:``
> +
> +  Act like the corresponding substitution above but replace any ``\``
> +  character with a ``/``. This is useful to normalize path separators.
> +
> +   Example: ``%s:  C:\Desktop Files/foo_test.s.tmp``
> +
> +   Example: ``%/s: C:/Desktop Files/foo_test.s.tmp``
> +
> +``%:s, %:S, %:t, %:T:``
> +
> +  Act like the corresponding substitution above but remove colons at
> +  the beginning of Windows paths. This is useful to allow concatenation
> +  of absolute paths on Windows to produce a legal path.
> +
> +   Example: ``%s:  C:\Desktop Files\foo_test.s.tmp``
> +
> +   Example: ``%:s: C\Desktop Files\foo_test.s.tmp``
> +
>
>  **LLVM-specific substitutions:**
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170209/fe71fd9e/attachment.html>


More information about the llvm-commits mailing list