]> granicus.if.org Git - llvm/commitdiff
Added REQUIRES to TestingGuide documentation
authorPiotr Padlewski <piotr.padlewski@gmail.com>
Fri, 8 Jul 2016 23:47:29 +0000 (23:47 +0000)
committerPiotr Padlewski <piotr.padlewski@gmail.com>
Fri, 8 Jul 2016 23:47:29 +0000 (23:47 +0000)
Reviewers: alexfh, wolfgangp, rengolin

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D22172

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274949 91177308-0d34-0410-b5e6-96231b3b80d8

docs/TestingGuide.rst
test/lit.cfg

index 6bc8a4af88b5c9609c0bb4b03f44a77ef400fe92..ddb699014286cc712b6ff86740f547bdc2342055 100644 (file)
@@ -387,6 +387,53 @@ depends on special features of sub-architectures, you must add the specific
 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
 -------------
index 67e851b6e81d313c82fc80f145ed018e73fecbe7..2adeaff1dc976ee39dd81475165ce1b99948cda9 100644 (file)
@@ -321,6 +321,7 @@ config.targets = frozenset(config.targets_to_build.split())
 ### Features
 
 # Shell execution
+# KEEP IN SYNC WITH FEATURES LIST IN TestingGuide.rst
 if execute_external:
     config.available_features.add('shell')