summaryrefslogtreecommitdiffstats
path: root/llvm/docs
diff options
context:
space:
mode:
authorDavid Bozier <seifsta@gmail.com>2017-02-09 14:12:30 +0000
committerDavid Bozier <seifsta@gmail.com>2017-02-09 14:12:30 +0000
commit9126f5428532809621ab57ab9a6ea5d6e72d1edd (patch)
tree74714e7c58150d61c10174ae1e760686173362d7 /llvm/docs
parent9e8a082db455983c6cd9f210eb60e05a37cdee23 (diff)
downloadbcm5719-llvm-9126f5428532809621ab57ab9a6ea5d6e72d1edd.tar.gz
bcm5719-llvm-9126f5428532809621ab57ab9a6ea5d6e72d1edd.zip
[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 llvm-svn: 294586
Diffstat (limited to 'llvm/docs')
-rw-r--r--llvm/docs/CommandGuide/lit.rst14
-rw-r--r--llvm/docs/TestingGuide.rst19
2 files changed, 24 insertions, 9 deletions
diff --git a/llvm/docs/CommandGuide/lit.rst b/llvm/docs/CommandGuide/lit.rst
index 2e9054b1ce9..85a9268a11f 100644
--- a/llvm/docs/CommandGuide/lit.rst
+++ b/llvm/docs/CommandGuide/lit.rst
@@ -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
diff --git a/llvm/docs/TestingGuide.rst b/llvm/docs/TestingGuide.rst
index 99616770d8e..a27da0de4d0 100644
--- a/llvm/docs/TestingGuide.rst
+++ b/llvm/docs/TestingGuide.rst
@@ -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:**
OpenPOWER on IntegriCloud