diff options
author | Craig Scott <craig.scott@crascit.com> | 2018-03-14 13:16:36 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-03-15 11:36:42 (GMT) |
commit | 96fdde26bbbc969944e556ad649191cd21f46990 (patch) | |
tree | 0304a27601c4392c7f0a88527c4b0c6fc37d8cc0 /Tests/RunCMake/GoogleTest/RunCMakeTest.cmake | |
parent | c1e087a9d3af74299d7681c9f9de59e5977a1539 (diff) | |
download | CMake-96fdde26bbbc969944e556ad649191cd21f46990.zip CMake-96fdde26bbbc969944e556ad649191cd21f46990.tar.gz CMake-96fdde26bbbc969944e556ad649191cd21f46990.tar.bz2 |
GoogleTest: Rename TIMEOUT parameter to avoid clash
In gtest_discover_tests(), the TIMEOUT keyword was making it
impossible to set the TIMEOUT test property via the PROPERTIES
keyword. This would be a frequent case, but it doesn't complain
and instead silently does something different to what would
normally be expected. The TIMEOUT keyword has been renamed
to DISCOVERY_TIMEOUT, thereby removing the clash.
This is a breaking change. 3.10.1 and 3.10.2 were the only versions
that supported the TIMEOUT keyword and uses of it were likely
not working as intended.
Fixes: #17801
Diffstat (limited to 'Tests/RunCMake/GoogleTest/RunCMakeTest.cmake')
-rw-r--r-- | Tests/RunCMake/GoogleTest/RunCMakeTest.cmake | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/Tests/RunCMake/GoogleTest/RunCMakeTest.cmake b/Tests/RunCMake/GoogleTest/RunCMakeTest.cmake index 73014d1..50979ec 100644 --- a/Tests/RunCMake/GoogleTest/RunCMakeTest.cmake +++ b/Tests/RunCMake/GoogleTest/RunCMakeTest.cmake @@ -19,12 +19,19 @@ function(run_GoogleTest) --target fake_gtest ) + run_cmake_command(GoogleTest-property-timeout-exe + ${CMAKE_COMMAND} + --build . + --config Debug + --target property_timeout_test + ) + set(RunCMake_TEST_OUTPUT_MERGE 1) - run_cmake_command(GoogleTest-timeout + run_cmake_command(GoogleTest-discovery-timeout ${CMAKE_COMMAND} --build . --config Debug - --target timeout_test + --target discovery_timeout_test ) set(RunCMake_TEST_OUTPUT_MERGE 0) @@ -45,7 +52,21 @@ function(run_GoogleTest) run_cmake_command(GoogleTest-test-missing ${CMAKE_CTEST_COMMAND} -C Debug - -R timeout + -R no_tests_defined + --no-label-summary + ) + + run_cmake_command(GoogleTest-property-timeout1 + ${CMAKE_CTEST_COMMAND} + -C Debug + -R property_timeout\\.case_no_discovery + --no-label-summary + ) + + run_cmake_command(GoogleTest-property-timeout2 + ${CMAKE_CTEST_COMMAND} + -C Debug + -R property_timeout\\.case_with_discovery --no-label-summary ) endfunction() |