[PATCH] D29281: [docs] cleanup documentation on lit substitutions

Dave Bozier via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 9 06:24:10 PST 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL294586: [docs] cleanup documentation on lit substitutions (authored by davidb).

Changed prior to commit:
  https://reviews.llvm.org/D29281?vs=86275&id=87797#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D29281

Files:
  llvm/trunk/docs/CommandGuide/lit.rst
  llvm/trunk/docs/TestingGuide.rst


Index: llvm/trunk/docs/TestingGuide.rst
===================================================================
--- llvm/trunk/docs/TestingGuide.rst
+++ llvm/trunk/docs/TestingGuide.rst
@@ -468,6 +468,25 @@
 
    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:**
 
Index: llvm/trunk/docs/CommandGuide/lit.rst
===================================================================
--- llvm/trunk/docs/CommandGuide/lit.rst
+++ llvm/trunk/docs/CommandGuide/lit.rst
@@ -379,7 +379,7 @@
 ~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 :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 @@
  %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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29281.87797.patch
Type: text/x-patch
Size: 2350 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170209/5642a3a5/attachment.bin>


More information about the llvm-commits mailing list