summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2019-07-19 16:14:14 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-07-19 16:14:27 (GMT)
commit16bb46eaf3261a2991e35e22116fd8a51d031b15 (patch)
tree8a63dfff76a0b2edab7571a4e2b631af633d0701 /Help
parent573f1fc19b39f0aaea6c17c1c11c1f5bbde227d3 (diff)
parent5dbd9c8583f44d0d9abe2ec95b2ddfd4ac65dc0d (diff)
downloadCMake-16bb46eaf3261a2991e35e22116fd8a51d031b15.zip
CMake-16bb46eaf3261a2991e35e22116fd8a51d031b15.tar.gz
CMake-16bb46eaf3261a2991e35e22116fd8a51d031b15.tar.bz2
Merge topic 'skip_regular_expression'
5dbd9c8583 Vim: Add SKIP_REGULAR_EXPRESSION test property to vim syntax file 407dd1a910 Help: Add documentation for SKIP_REGULAR_EXPRESSION test property d7955d4e5d Tests: Create test for SKIP_REGULAR_EXPRESSION test property 4f1dec86a5 CTest: Add SKIP_REGULAR_EXPRESSION test property Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3570
Diffstat (limited to 'Help')
-rw-r--r--Help/command/add_test.rst5
-rw-r--r--Help/manual/cmake-properties.7.rst1
-rw-r--r--Help/prop_test/SKIP_REGULAR_EXPRESSION.rst17
-rw-r--r--Help/prop_test/SKIP_RETURN_CODE.rst2
-rw-r--r--Help/release/dev/add_skip_regular_expression_test_property.rst10
5 files changed, 33 insertions, 2 deletions
diff --git a/Help/command/add_test.rst b/Help/command/add_test.rst
index 884b2ee..a77ba37 100644
--- a/Help/command/add_test.rst
+++ b/Help/command/add_test.rst
@@ -38,8 +38,9 @@ The given test command is expected to exit with code ``0`` to pass and
non-zero to fail, or vice-versa if the :prop_test:`WILL_FAIL` test
property is set. Any output written to stdout or stderr will be
captured by :manual:`ctest(1)` but does not affect the pass/fail status
-unless the :prop_test:`PASS_REGULAR_EXPRESSION` or
-:prop_test:`FAIL_REGULAR_EXPRESSION` test property is used.
+unless the :prop_test:`PASS_REGULAR_EXPRESSION`,
+:prop_test:`FAIL_REGULAR_EXPRESSION` or
+:prop_test:`SKIP_REGULAR_EXPRESSION` test property is used.
The ``COMMAND`` and ``WORKING_DIRECTORY`` options may use "generator
expressions" with the syntax ``$<...>``. See the
diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst
index 0beca82..ae4be3e 100644
--- a/Help/manual/cmake-properties.7.rst
+++ b/Help/manual/cmake-properties.7.rst
@@ -407,6 +407,7 @@ Properties on Tests
/prop_test/REQUIRED_FILES
/prop_test/RESOURCE_LOCK
/prop_test/RUN_SERIAL
+ /prop_test/SKIP_REGULAR_EXPRESSION
/prop_test/SKIP_RETURN_CODE
/prop_test/TIMEOUT
/prop_test/TIMEOUT_AFTER_MATCH
diff --git a/Help/prop_test/SKIP_REGULAR_EXPRESSION.rst b/Help/prop_test/SKIP_REGULAR_EXPRESSION.rst
new file mode 100644
index 0000000..2c6d980
--- /dev/null
+++ b/Help/prop_test/SKIP_REGULAR_EXPRESSION.rst
@@ -0,0 +1,17 @@
+SKIP_REGULAR_EXPRESSION
+-----------------------
+
+If the output matches this regular expression the test will be marked as skipped.
+
+If set, if the output matches one of specified regular expressions,
+the test will be marked as skipped. Example:
+
+.. code-block:: cmake
+
+ set_property(TEST mytest PROPERTY
+ SKIP_REGULAR_EXPRESSION "[^a-z]Skip" "SKIP" "Skipped"
+ )
+
+``SKIP_REGULAR_EXPRESSION`` expects a list of regular expressions.
+
+See also the :prop_test:`SKIP_RETURN_CODE` property.
diff --git a/Help/prop_test/SKIP_RETURN_CODE.rst b/Help/prop_test/SKIP_RETURN_CODE.rst
index 3d48c2f..23c4c62 100644
--- a/Help/prop_test/SKIP_RETURN_CODE.rst
+++ b/Help/prop_test/SKIP_RETURN_CODE.rst
@@ -8,3 +8,5 @@ test are met. If such a situation should not be considered a hard failure
a return code of the process can be specified that will mark the test as
``Not Run`` if it is encountered. Valid values are in the range of
0 to 255, inclusive.
+
+See also the :prop_test:`SKIP_REGULAR_EXPRESSION` property.
diff --git a/Help/release/dev/add_skip_regular_expression_test_property.rst b/Help/release/dev/add_skip_regular_expression_test_property.rst
new file mode 100644
index 0000000..20ef214
--- /dev/null
+++ b/Help/release/dev/add_skip_regular_expression_test_property.rst
@@ -0,0 +1,10 @@
+add_skip_regular_expression_test_property
+-----------------------------------------
+
+* A new test property, :prop_test:`SKIP_REGULAR_EXPRESSION`, has been added.
+ This property is similar to :prop_test:`FAIL_REGULAR_EXPRESSION` and
+ :prop_test:`PASS_REGULAR_EXPRESSION`, but with the same meaning as
+ :prop_test:`SKIP_RETURN_CODE`. This is useful, for example, in cases where
+ the user has no control over the return code of the test. For example, in
+ Catch2, the return value is the number of assertion failed, therefore it is
+ impossible to use it for :prop_test:`SKIP_RETURN_CODE`.