[PATCH] D22172: Added REQUIRES to TestingGuide documentation

Piotr Padlewski via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 8 16:16:57 PDT 2016


Prazek updated this revision to Diff 63353.
Prazek marked an inline comment as done.
Prazek added a comment.

LAst review


http://reviews.llvm.org/D22172

Files:
  docs/TestingGuide.rst
  test/lit.cfg

Index: test/lit.cfg
===================================================================
--- test/lit.cfg
+++ test/lit.cfg
@@ -321,6 +321,7 @@
 ### Features
 
 # Shell execution
+# KEEP IN SYNC WITH FEATURES LIST IN TestingGuide.rst
 if execute_external:
     config.available_features.add('shell')
 
Index: docs/TestingGuide.rst
===================================================================
--- docs/TestingGuide.rst
+++ docs/TestingGuide.rst
@@ -387,6 +387,53 @@
 triple, test with the specific FileCheck and put it into the specific
 directory that will filter out all other architectures.
 
+REQUIRES and REQUIRES-ANY directive
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Some tests can be enabled only in specific situation - like having
+debug build. Use ``REQUIRES`` directive to specify those requirements.
+
+.. code-block:: llvm
+
+    ; This test will be only enabled in the build with asserts
+    ; REQUIRES: asserts
+
+You can separate requirements by a comma.
+``REQUIRES`` means all listed requirements must be satisfied.
+``REQUIRES-ANY`` means at least one must be satisfied.
+
+List of features that can be used in ``REQUIRES`` and ``REQUIRES-ANY``:
+- asan
+- not_asan
+- asserts
+- can-execute
+- debug_frame
+- default_triple
+- dfsan
+- fma3
+- global-isel
+- ld64_plugin
+- ld_emu_elf32ppc
+- ld_plugin
+- linux
+- loadable_module
+- long_tests
+- lsan
+- msan
+- not_msan
+- native
+- object-emission
+- python-psutil
+- shell
+- system-windows
+- ubsan
+- not_ubsan
+- x86_64-linux
+- xar
+- zlib
+- nozlib
+
+To add new features change lit.cfg in test directory.
 
 Substitutions
 -------------


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22172.63353.patch
Type: text/x-patch
Size: 1623 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160708/d95b78a5/attachment.bin>


More information about the llvm-commits mailing list