mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-31 10:50:16 -06:00
GoogleTest: Add missing test case for gtest_discover_tests failure
Discovery timeout test needs split out into two components: - build - test Building the project should result in a failure due to the timeout when executing gtest discovery as a post build step. Likewise, if you ran CTest after this build failure, we should *also* detect that the discovery_timeout_test has not been built because no discovery_timeout_test[1]_tests.cmake has been created due to the test discovery failure (caused by the timeout).
This commit is contained in:
@@ -0,0 +1 @@
|
||||
[^0]
|
||||
@@ -0,0 +1,2 @@
|
||||
Unable to find executable: discovery_timeout_test_NOT_BUILT
|
||||
Errors while running CTest
|
||||
@@ -0,0 +1,18 @@
|
||||
Test project .*GoogleTest-build
|
||||
[ \t]*Start [0-9]+: discovery_timeout_test_NOT_BUILT
|
||||
Could not find executable discovery_timeout_test_NOT_BUILT
|
||||
Looked in the following places:
|
||||
discovery_timeout_test_NOT_BUILT
|
||||
discovery_timeout_test_NOT_BUILT(\.exe)?
|
||||
Debug/discovery_timeout_test_NOT_BUILT
|
||||
Debug/discovery_timeout_test_NOT_BUILT(\.exe)?
|
||||
Debug/discovery_timeout_test_NOT_BUILT
|
||||
Debug/discovery_timeout_test_NOT_BUILT(\.exe)?
|
||||
[^\n]+discovery_timeout_test_NOT_BUILT +\.+\*\*\*Not Run +[0-9.]+ sec
|
||||
+
|
||||
0% tests passed, 1 tests failed out of 1
|
||||
+
|
||||
Total Test time \(real\) = +[0-9.]+ sec
|
||||
+
|
||||
The following tests FAILED:
|
||||
[^\n]+discovery_timeout_test_NOT_BUILT \(Not Run\)
|
||||
@@ -27,7 +27,7 @@ function(run_GoogleTest)
|
||||
)
|
||||
|
||||
set(RunCMake_TEST_OUTPUT_MERGE 1)
|
||||
run_cmake_command(GoogleTest-discovery-timeout
|
||||
run_cmake_command(GoogleTest-discovery-timeout-build
|
||||
${CMAKE_COMMAND}
|
||||
--build .
|
||||
--config Debug
|
||||
@@ -69,6 +69,13 @@ function(run_GoogleTest)
|
||||
-R property_timeout\\.case_with_discovery
|
||||
--no-label-summary
|
||||
)
|
||||
|
||||
run_cmake_command(GoogleTest-discovery-timeout-test
|
||||
${CMAKE_CTEST_COMMAND}
|
||||
-C Debug
|
||||
-R discovery_timeout_test
|
||||
--no-label-summary
|
||||
)
|
||||
endfunction()
|
||||
|
||||
run_GoogleTest()
|
||||
|
||||
Reference in New Issue
Block a user