summaryrefslogtreecommitdiffstats
path: root/Help/prop_test
diff options
context:
space:
mode:
authorMichael Hirsch <scivision@users.noreply.github.com>2020-06-03 20:22:49 (GMT)
committerCraig Scott <craig.scott@crascit.com>2020-06-08 23:04:04 (GMT)
commit61139c91d25302c9b7594b73638093d96af9539a (patch)
tree7a89198908de4531325a7df7dc42bbde8afb8ec1 /Help/prop_test
parent01069f9a107eba9765541640c65c72cc3bc27620 (diff)
downloadCMake-61139c91d25302c9b7594b73638093d96af9539a.zip
CMake-61139c91d25302c9b7594b73638093d96af9539a.tar.gz
CMake-61139c91d25302c9b7594b73638093d96af9539a.tar.bz2
Help: Add example for DEPENDS test property
Diffstat (limited to 'Help/prop_test')
-rw-r--r--Help/prop_test/DEPENDS.rst12
1 files changed, 12 insertions, 0 deletions
diff --git a/Help/prop_test/DEPENDS.rst b/Help/prop_test/DEPENDS.rst
index 89c7553..5aa36b4 100644
--- a/Help/prop_test/DEPENDS.rst
+++ b/Help/prop_test/DEPENDS.rst
@@ -8,3 +8,15 @@ results of those tests are not considered, the dependency relationship is
purely for order of execution (i.e. it is really just a *run after*
relationship). Consider using test fixtures with setup tests if a dependency
with successful completion is required (see :prop_test:`FIXTURES_REQUIRED`).
+
+Examples
+~~~~~~~~
+
+.. code-block:: cmake
+
+ add_test(NAME baseTest1 ...)
+ add_test(NAME baseTest2 ...)
+ add_test(NAME dependsTest12 ...)
+
+ set_tests_properties(dependsTest12 PROPERTIES DEPENDS "baseTest1;baseTest2")
+ # dependsTest12 runs after baseTest1 and baseTest2, even if they fail