summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorMatthew Woehlke <matthew.woehlke@kitware.com>2017-07-27 13:47:28 (GMT)
committerMatthew Woehlke <matthew.woehlke@kitware.com>2017-07-27 13:47:28 (GMT)
commitbfcda4013a52e81a1ffc2f10a6006ba75b9b607d (patch)
treed47130290e0d71912e392418d59737b2bbb9f511 /Help
parentaa97170f2b25a99d2cc69fd6b2a059e52872f341 (diff)
downloadCMake-bfcda4013a52e81a1ffc2f10a6006ba75b9b607d.zip
CMake-bfcda4013a52e81a1ffc2f10a6006ba75b9b607d.tar.gz
CMake-bfcda4013a52e81a1ffc2f10a6006ba75b9b607d.tar.bz2
Add dynamic test discovery for for Google Test
Add a new gtest_discover_tests function to GoogleTest.cmake, implementing dynamic test discovery (i.e. tests are discovered by actually running the test executable and asking for the list of available tests, which is used to dynamically declare the tests) rather than the source-parsing approach used by gtest_add_tests. Compared to the source-parsing approach, this has the advantage of being robust against users declaring tests in unusual ways, and much better support for advanced features such as parameterized tests. A unit test, modeled after the TEST_INCLUDE_DIR[S] test, is also included. Note that the unit test does not actually require that Google Test is available. The new functionality does not actually depend on Google Test as such; it only requires that the test executable lists tests in the expected format when invoked with --gtest_list_tests, which the unit test can fake readily.
Diffstat (limited to 'Help')
-rw-r--r--Help/release/dev/GoogleTest.rst11
1 files changed, 11 insertions, 0 deletions
diff --git a/Help/release/dev/GoogleTest.rst b/Help/release/dev/GoogleTest.rst
new file mode 100644
index 0000000..1e4a10e
--- /dev/null
+++ b/Help/release/dev/GoogleTest.rst
@@ -0,0 +1,11 @@
+GoogleTest
+----------
+
+* The :module:`GoogleTest` module gained a new command
+ :command:`gtest_discover_tests` implementing dynamic (build-time) test
+ discovery. Unlike the source parsing approach, dynamic discovery executes
+ the test (in 'list available tests' mode) at build time to discover tests.
+ This is robust against unusual ways of labeling tests, provides much better
+ support for advanced features such as parameterized tests, and does not
+ require re-running CMake to discover added or removed tests within a test
+ executable.