Files
CMake/Tests/RunCMake/GoogleTest/GoogleTest.cmake
Matthew Woehlke 29731d8919 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.)
2017-12-06 07:37:48 -05:00

30 lines
486 B
CMake

project(test_include_dirs)
include(CTest)
include(GoogleTest)
enable_testing()
add_executable(fake_gtest fake_gtest.cpp)
gtest_discover_tests(
fake_gtest
TEST_PREFIX TEST:
TEST_SUFFIX !1
EXTRA_ARGS how now "\"brown\" cow"
PROPERTIES LABELS TEST1
)
gtest_discover_tests(
fake_gtest
TEST_PREFIX TEST:
TEST_SUFFIX !2
EXTRA_ARGS how now "\"brown\" cow"
PROPERTIES LABELS TEST2
)
add_executable(timeout_test timeout_test.cpp)
gtest_discover_tests(
timeout_test
)