text stringlengths 0 88 |
|---|
groups minus 1 on the right. For example, in the example above, the two |
groups in the first description would have IDs of 0 and 1, and the single |
group in the second description would have an ID of 2. |
Both the ``RESOURCE_GROUPS`` and :prop_test:`RESOURCE_LOCK` properties serve |
similar purposes, but they are distinct and orthogonal. Resources specified by |
``RESOURCE_GROUPS`` do not affect :prop_test:`RESOURCE_LOCK`, and vice versa. |
Whereas :prop_test:`RESOURCE_LOCK` is a simpler property that is used for |
locking one global resource, ``RESOURCE_GROUPS`` is a more advanced property |
that allows multiple tests to simultaneously use multiple resources of the |
same type, specifying their requirements in a fine-grained manner. |
RESOURCE_LOCK |
------------- |
Specify a list of resources that are locked by this test. |
If multiple tests specify the same resource lock, they are guaranteed |
not to run concurrently. |
See also :prop_test:`FIXTURES_REQUIRED` if the resource requires any setup or |
cleanup steps. |
Both the :prop_test:`RESOURCE_GROUPS` and ``RESOURCE_LOCK`` properties serve |
similar purposes, but they are distinct and orthogonal. Resources specified by |
:prop_test:`RESOURCE_GROUPS` do not affect ``RESOURCE_LOCK``, and vice versa. |
Whereas ``RESOURCE_LOCK`` is a simpler property that is used for locking one |
global resource, :prop_test:`RESOURCE_GROUPS` is a more advanced property |
that allows multiple tests to simultaneously use multiple resources of the |
same type, specifying their requirements in a fine-grained manner. |
RUN_SERIAL |
---------- |
Do not run this test in parallel with any other test. |
Use this option in conjunction with the ctest_test ``PARALLEL_LEVEL`` |
option to specify that this test should not be run in parallel with |
any other tests. |
SKIP_REGULAR_EXPRESSION |
----------------------- |
.. versionadded:: 3.16 |
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`, |
:prop_test:`PASS_REGULAR_EXPRESSION`, and :prop_test:`FAIL_REGULAR_EXPRESSION` |
test properties. |
SKIP_RETURN_CODE |
---------------- |
Return code to mark a test as skipped. |
Sometimes only a test itself can determine if all requirements for the |
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. |
TIMEOUT |
------- |
How many seconds to allow for this test. |
This property if set will limit a test to not take more than the |
specified number of seconds to run. If it exceeds that the test |
process will be killed and ctest will move to the next test. This |
setting takes precedence over :variable:`CTEST_TEST_TIMEOUT`. |
An explicit ``0`` value means the test has no timeout, except as |
necessary to honor :option:`ctest --stop-time`. |
See also :prop_test:`TIMEOUT_AFTER_MATCH` and |
:prop_test:`TIMEOUT_SIGNAL_NAME`. |
TIMEOUT_AFTER_MATCH |
------------------- |
.. versionadded:: 3.6 |
Change a test's timeout duration after a matching line is encountered |
in its output. |
Usage |
^^^^^ |
.. code-block:: cmake |
add_test(mytest ...) |
set_property(TEST mytest PROPERTY TIMEOUT_AFTER_MATCH "${seconds}" "${regex}") |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.