From f88cc148b6244f3ec2483d373f917c29fa46bdbb Mon Sep 17 00:00:00 2001 From: Paul Robinson Date: Mon, 4 Apr 2016 17:14:45 +0000 Subject: Document standard substitutions defined by lit. Patch by Guilherme Bufolo! Differential Revision: http://reviews.llvm.org/D18752 llvm-svn: 265314 --- llvm/docs/CommandGuide/lit.rst | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'llvm/docs/CommandGuide') diff --git a/llvm/docs/CommandGuide/lit.rst b/llvm/docs/CommandGuide/lit.rst index 0ec14bb2236..b2da58ec02c 100644 --- a/llvm/docs/CommandGuide/lit.rst +++ b/llvm/docs/CommandGuide/lit.rst @@ -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 ~~~~~~~~~~~~~~~~~~~~~~ -- cgit v1.2.3