[llvm] r274949 - Added REQUIRES to TestingGuide documentation

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


Author: prazek
Date: Fri Jul  8 18:47:29 2016
New Revision: 274949

URL: http://llvm.org/viewvc/llvm-project?rev=274949&view=rev
Log:
Added REQUIRES to TestingGuide  documentation

Reviewers: alexfh, wolfgangp, rengolin

Subscribers: llvm-commits

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

Modified:
    llvm/trunk/docs/TestingGuide.rst
    llvm/trunk/test/lit.cfg

Modified: llvm/trunk/docs/TestingGuide.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/TestingGuide.rst?rev=274949&r1=274948&r2=274949&view=diff
==============================================================================
--- llvm/trunk/docs/TestingGuide.rst (original)
+++ llvm/trunk/docs/TestingGuide.rst Fri Jul  8 18:47:29 2016
@@ -387,6 +387,53 @@ depends on special features of sub-archi
 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
 -------------

Modified: llvm/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/lit.cfg?rev=274949&r1=274948&r2=274949&view=diff
==============================================================================
--- llvm/trunk/test/lit.cfg (original)
+++ llvm/trunk/test/lit.cfg Fri Jul  8 18:47:29 2016
@@ -321,6 +321,7 @@ config.targets = frozenset(config.target
 ### Features
 
 # Shell execution
+# KEEP IN SYNC WITH FEATURES LIST IN TestingGuide.rst
 if execute_external:
     config.available_features.add('shell')
 




More information about the llvm-commits mailing list