diff options
author | DavidPerretSN <david.perret@smith-nephew.com> | 2022-11-04 07:13:20 (GMT) |
---|---|---|
committer | David Perret <david.perret@smith-nephew.com> | 2022-11-07 09:21:30 (GMT) |
commit | f54963e60f3718bfb3d526097252dcf64fa2f34f (patch) | |
tree | 7b8259251d720f9177c1514f4f6b2fc02512b9b4 /Modules/GoogleTest.cmake | |
parent | 182ef53d3d6779db09be196f5be245ffb5d57640 (diff) | |
download | CMake-f54963e60f3718bfb3d526097252dcf64fa2f34f.zip CMake-f54963e60f3718bfb3d526097252dcf64fa2f34f.tar.gz CMake-f54963e60f3718bfb3d526097252dcf64fa2f34f.tar.bz2 |
GoogleTest: Reports skipped test with gtest_add_tests
Skipped GTests were reported as success when tests where added with gtest_add_tests. This fixes this behaviour.
Fixes: #24130
Diffstat (limited to 'Modules/GoogleTest.cmake')
-rw-r--r-- | Modules/GoogleTest.cmake | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/GoogleTest.cmake b/Modules/GoogleTest.cmake index b8dc482..79e9437 100644 --- a/Modules/GoogleTest.cmake +++ b/Modules/GoogleTest.cmake @@ -405,6 +405,12 @@ function(gtest_add_tests) --gtest_filter=${gtest_test_name} ${ARGS_EXTRA_ARGS} ) + # Makes sure a skipped GTest is reported as so by CTest + set_tests_properties( + ${ctest_test_name} + PROPERTIES + SKIP_REGULAR_EXPRESSION "\\[ SKIPPED \\]" + ) list(APPEND testList ${ctest_test_name}) endif() endforeach() |