[PATCH] D139869: [lit] Document the 'target=<triple>' feature

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 15 15:17:34 PST 2022


probinson updated this revision to Diff 483362.
probinson added a comment.

Also update examples.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139869/new/

https://reviews.llvm.org/D139869

Files:
  llvm/docs/TestingGuide.rst


Index: llvm/docs/TestingGuide.rst
===================================================================
--- llvm/docs/TestingGuide.rst
+++ llvm/docs/TestingGuide.rst
@@ -499,10 +499,10 @@
 
     ; This test will be only enabled in the build with asserts.
     ; REQUIRES: asserts
-    ; This test is disabled on Linux.
-    ; UNSUPPORTED: -linux-
-    ; This test is expected to fail on PowerPC.
-    ; XFAIL: powerpc
+    ; This test is disabled when running on Linux.
+    ; UNSUPPORTED: system-linux
+    ; This test is expected to fail when targeting PowerPC.
+    ; XFAIL: target=powerpc{{.*}}
 
 ``REQUIRES`` and ``UNSUPPORTED`` and ``XFAIL`` all accept a comma-separated
 list of boolean expressions. The values in each expression may be:
@@ -513,7 +513,10 @@
   expression is satisfied if any feature matches the regular expression. Regular
   expressions can appear inside an identifier, so for example ``he{{l+}}o`` would match
   ``helo``, ``hello``, ``helllo``, and so on.
-- Substrings of the target triple (``UNSUPPORTED`` and ``XFAIL`` only).
+- The default target triple, preceded by the string ``target=`` (for example,
+  ``target=x86_64-pc-windows-msvc``). Typically regular expressions are used
+  to match parts of the triple (for example, ``target={{.*}}-windows{{.*}}``
+  to match any Windows target triple).
 
 | ``REQUIRES`` enables the test if all expressions are true.
 | ``UNSUPPORTED`` disables the test if any expression is true.
@@ -523,11 +526,11 @@
 
 .. code-block:: llvm
 
-    ; This test is disabled on Windows,
-    ; and is disabled on Linux, except for Android Linux.
-    ; UNSUPPORTED: windows, linux && !android
-    ; This test is expected to fail on both PowerPC and ARM.
-    ; XFAIL: powerpc || arm
+    ; This test is disabled when running on Windows,
+    ; and is disabled when targeting Linux, except for Android Linux.
+    ; UNSUPPORTED: system-windows, target={{.*linux.*}} && !target={{.*android.*}}
+    ; This test is expected to fail when targeting PowerPC or running on Darwin.
+    ; XFAIL: target=powerpc{{.*}}, system-darwin
 
 
 Substitutions


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139869.483362.patch
Type: text/x-patch
Size: 2105 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221215/b808b4e5/attachment.bin>


More information about the llvm-commits mailing list