Automatically add TEST_SUITE labels to discovered tests which map to the test suites of the test cases (#464)
diff --git a/scripts/cmake/doctest.cmake b/scripts/cmake/doctest.cmake
index 8b81c9d..3c4929f 100644
--- a/scripts/cmake/doctest.cmake
+++ b/scripts/cmake/doctest.cmake
@@ -32,6 +32,7 @@
[TEST_PREFIX prefix]
[TEST_SUFFIX suffix]
[PROPERTIES name1 value1...]
+ [ADD_LABELS value]
[TEST_LIST var]
[JUNIT_OUTPUT_DIR dir]
)
@@ -85,6 +86,9 @@
Specifies additional properties to be set on all tests discovered by this
invocation of ``doctest_discover_tests``.
+ ``ADD_LABELS value``
+ Specifies if the test labels should be set automatically.
+
``TEST_LIST var``
Make the list of tests available in the variable ``var``, rather than the
default ``<target>_TESTS``. This can be useful when the same test
@@ -106,7 +110,7 @@
""
""
"TEST_PREFIX;TEST_SUFFIX;WORKING_DIRECTORY;TEST_LIST;JUNIT_OUTPUT_DIR"
- "TEST_SPEC;EXTRA_ARGS;PROPERTIES"
+ "TEST_SPEC;EXTRA_ARGS;PROPERTIES;ADD_LABELS"
${ARGN}
)
@@ -139,6 +143,7 @@
-D "TEST_SPEC=${_TEST_SPEC}"
-D "TEST_EXTRA_ARGS=${_EXTRA_ARGS}"
-D "TEST_PROPERTIES=${_PROPERTIES}"
+ -D "TEST_ADD_LABELS=${_ADD_LABELS}"
-D "TEST_PREFIX=${_TEST_PREFIX}"
-D "TEST_SUFFIX=${_TEST_SUFFIX}"
-D "TEST_LIST=${_TEST_LIST}"