diff options
author | Jordan Rose <jordan_rose@apple.com> | 2017-10-13 16:12:23 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2017-10-13 16:12:23 +0000 |
commit | 53be3224b2f3fdd359e16e5280d1c56defb7b04c (patch) | |
tree | 390c1c3ac7bec7bd7d151292e07c24d31674d2d9 /llvm/docs | |
parent | 5805fb3dfca46524e8a3fa3c22036d41ecdfb68a (diff) | |
download | bcm5719-llvm-53be3224b2f3fdd359e16e5280d1c56defb7b04c.tar.gz bcm5719-llvm-53be3224b2f3fdd359e16e5280d1c56defb7b04c.zip |
lit.py: Add new %{shared_output(LABEL)} substitution
This refers to a temporary path that can be shared across all tests,
identified by a particular label. This can be used for things like
caches.
At the moment, the character set for the LABEL is limited to C
identifier characters, plus '-', '+', '=', and '.'. This is the same
set of characters currently allowed in REQUIRES clause identifiers.
llvm-svn: 315697
Diffstat (limited to 'llvm/docs')
-rw-r--r-- | llvm/docs/CommandGuide/lit.rst | 23 | ||||
-rw-r--r-- | llvm/docs/TestingGuide.rst | 6 |
2 files changed, 18 insertions, 11 deletions
diff --git a/llvm/docs/CommandGuide/lit.rst b/llvm/docs/CommandGuide/lit.rst index fbe1a9ab184..57d804478fc 100644 --- a/llvm/docs/CommandGuide/lit.rst +++ b/llvm/docs/CommandGuide/lit.rst @@ -395,17 +395,18 @@ PRE-DEFINED SUBSTITUTIONS :program:`lit` provides various patterns that can be used with the RUN command. These are defined in TestRunner.py. The base set of substitutions are: - ========== ============== - 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 - %% % - ========== ============== + ======================= ============== + 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 + %{shared_output(LABEL)} temporary file name, identified by "LABEL", shared across all tests + %% % + ======================= ============== Other substitutions are provided that are variations on this base set and further substitution patterns can be defined by each test module. See the diff --git a/llvm/docs/TestingGuide.rst b/llvm/docs/TestingGuide.rst index a27da0de4d0..cd1f00b20f9 100644 --- a/llvm/docs/TestingGuide.rst +++ b/llvm/docs/TestingGuide.rst @@ -464,6 +464,12 @@ RUN lines: Example: ``/home/user/llvm.build/test/MC/ELF/Output`` +``%{shared_output(LABEL)}`` + File path to a temporary file name shared across all tests, identified by + LABEL. This is useful as a cache for generated resources. + + Example: ``/home/user/llvm.build/test/Output/Shared/LABEL.tmp`` + ``%{pathsep}`` Expands to the path separator, i.e. ``:`` (or ``;`` on Windows). |