[PATCH] D71408: [lit] Document lit's REQUIRES-ANY

Thomas Preud'homme via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 12 03:48:07 PST 2019


thopre created this revision.
thopre added reviewers: probinson, jdenny, gparker42.
Herald added a project: LLVM.

Document the REQUIRES-ANY lit directive which is used in a few places in
the testsuites.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D71408

Files:
  llvm/docs/TestingGuide.rst


Index: llvm/docs/TestingGuide.rst
===================================================================
--- llvm/docs/TestingGuide.rst
+++ llvm/docs/TestingGuide.rst
@@ -406,8 +406,8 @@
 ---------------------------
 
 Some tests can be run only in specific configurations, such as
-with debug builds or on particular platforms. Use ``REQUIRES``
-and ``UNSUPPORTED`` to control when the test is enabled.
+with debug builds or on particular platforms. Use ``REQUIRES``,
+``REQUIRES-ANY`` and ``UNSUPPORTED`` to control when the test is enabled.
 
 Some tests are expected to fail. For example, there may be a known bug
 that the test detect. Use ``XFAIL`` to mark a test as an expected failure.
@@ -418,19 +418,23 @@
 
     ; This test will be only enabled in the build with asserts.
     ; REQUIRES: asserts
+    ; This test will enable if targeting x86_64 or x86_64h.
+    ; REQUIRES-ANY: x86_64, x86_64h
     ; This test is disabled on Linux.
     ; UNSUPPORTED: -linux-
     ; This test is expected to fail on PowerPC.
     ; XFAIL: powerpc
 
-``REQUIRES`` and ``UNSUPPORTED`` and ``XFAIL`` all accept a comma-separated
-list of boolean expressions. The values in each expression may be:
+``REQUIRES``, ``REQUIRES-ANY``, ``UNSUPPORTED`` and ``XFAIL`` all accept a
+comma-separated list of boolean expressions. The values in each expression may
+be:
 
 - Features added to ``config.available_features`` by 
   configuration files such as ``lit.cfg``.
 - Substrings of the target triple (``UNSUPPORTED`` and ``XFAIL`` only).
 
 | ``REQUIRES`` enables the test if all expressions are true.
+| ``REQUIRES-ANY`` enables the test if any expression is true.
 | ``UNSUPPORTED`` disables the test if any expression is true.
 | ``XFAIL`` expects the test to fail if any expression is true.
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71408.233567.patch
Type: text/x-patch
Size: 1782 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191212/c8f44bfe/attachment.bin>


More information about the llvm-commits mailing list