[PATCH] D18752: Documented standard substitutions defined by lit

guibufolo+llvm@gmail.com via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 4 00:40:11 PDT 2016


RedX2501 created this revision.
RedX2501 added reviewers: EricWF, MatzeB, echristo, jroelofs.
RedX2501 added a subscriber: cfe-commits.

http://reviews.llvm.org/D18752

Files:
  docs/CommandGuide/lit.rst

Index: docs/CommandGuide/lit.rst
===================================================================
--- docs/CommandGuide/lit.rst
+++ docs/CommandGuide/lit.rst
@@ -355,6 +355,32 @@
 configuration parameters --- for example, to change the test format, or the
 suffixes which identify test files.
 
+PRE-DEFINED SUBSTITUTIONS
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+:program:`lit` provides various macros 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         tmpbase + ".tmp"
+ %T         tmpdir
+ %%         %
+ %/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`.
+
 TEST RUN OUTPUT FORMAT
 ~~~~~~~~~~~~~~~~~~~~~~
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18752.52526.patch
Type: text/x-patch
Size: 1257 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160404/6fba95b8/attachment-0001.bin>


More information about the cfe-commits mailing list