summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/GoogleTest/GoogleTest.cmake
diff options
context:
space:
mode:
authorMatthew Woehlke <matthew.woehlke@kitware.com>2017-11-28 15:52:18 (GMT)
committerBrad King <brad.king@kitware.com>2017-12-06 12:37:48 (GMT)
commit29731d89192681cbc4bf87d7947a877aa0fb27aa (patch)
tree7da7ff6db386d5ff54382af3b106c8a50e1b86fa /Tests/RunCMake/GoogleTest/GoogleTest.cmake
parente99e39829ba36dbfad189a94062363343d7d3d8b (diff)
downloadCMake-29731d89192681cbc4bf87d7947a877aa0fb27aa.zip
CMake-29731d89192681cbc4bf87d7947a877aa0fb27aa.tar.gz
CMake-29731d89192681cbc4bf87d7947a877aa0fb27aa.tar.bz2
GoogleTest: Add timeout to discovery
Add a TIMEOUT option to gtest_discover_tests. This provides a work-around in case a test goes out to lunch, rather than causing the build to simply hang. (Although this is still a problem with the user's project, hanging the build is not cool, especially in the case of automatically running CI builds. It is much preferred that the build should actively fail in this case, and it is trivially easy for us to implement that.)
Diffstat (limited to 'Tests/RunCMake/GoogleTest/GoogleTest.cmake')
-rw-r--r--Tests/RunCMake/GoogleTest/GoogleTest.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/Tests/RunCMake/GoogleTest/GoogleTest.cmake b/Tests/RunCMake/GoogleTest/GoogleTest.cmake
index 58f4196..5e4b8ef 100644
--- a/Tests/RunCMake/GoogleTest/GoogleTest.cmake
+++ b/Tests/RunCMake/GoogleTest/GoogleTest.cmake
@@ -21,3 +21,9 @@ gtest_discover_tests(
EXTRA_ARGS how now "\"brown\" cow"
PROPERTIES LABELS TEST2
)
+
+add_executable(timeout_test timeout_test.cpp)
+
+gtest_discover_tests(
+ timeout_test
+)