OSDN Git Service

Document standard substitutions defined by lit.
authorPaul Robinson <paul_robinson@playstation.sony.com>
Mon, 4 Apr 2016 17:14:45 +0000 (17:14 +0000)
committerPaul Robinson <paul_robinson@playstation.sony.com>
Mon, 4 Apr 2016 17:14:45 +0000 (17:14 +0000)
Patch by Guilherme Bufolo!

Differential Revision: http://reviews.llvm.org/D18752

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265314 91177308-0d34-0410-b5e6-96231b3b80d8

docs/CommandGuide/lit.rst

index 0ec14bb..b2da58e 100644 (file)
@@ -355,6 +355,35 @@ be used to define subdirectories of optional tests, or to change other
 configuration parameters --- for example, to change the test format, or the
 suffixes which identify test files.
 
+PRE-DEFINED SUBSTITUTIONS
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+:program:`lit` provides various patterns that can be used with the RUN command.
+These are defined in TestRunner.py.
+
+ ========== ==============
+  Macro      Substitution
+ ========== ==============
+ %s         source path (path to the file currently being run)
+ %S         source dir (directory of the file currently being run)
+ %p         same as %S
+ %{pathsep} path separator
+ %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`.
+
+More information on the testing infrastucture can be found in the
+:doc:`../TestingGuide`.
+
 TEST RUN OUTPUT FORMAT
 ~~~~~~~~~~~~~~~~~~~~~~