summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorAlexander Stein <alexander.stein@mailbox.org>2020-04-08 17:51:44 (GMT)
committerBrad King <brad.king@kitware.com>2020-04-10 13:43:26 (GMT)
commit98868dad1c00ceb60eec81b9e20d684ff3c61a85 (patch)
treea1a0e5c910686710d9c64f72fe1c18249875fb6d /Modules
parent37fa5122c2c1e2138b9e01191dc3cc1800f6ba40 (diff)
downloadCMake-98868dad1c00ceb60eec81b9e20d684ff3c61a85.zip
CMake-98868dad1c00ceb60eec81b9e20d684ff3c61a85.tar.gz
CMake-98868dad1c00ceb60eec81b9e20d684ff3c61a85.tar.bz2
GoogleTest: Add support for skipped tests
Skipped tests are currently reported as successful. Using SKIP_REGULAR_EXPRESSION on googletest's output prefix, skipped tests can be detected and accounted accordingly. Using SKIP_RETURN_CODE is not possible, googletests exit code is not affected by skipped tests. Fixes: #19669
Diffstat (limited to 'Modules')
-rw-r--r--Modules/GoogleTestAddTests.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/GoogleTestAddTests.cmake b/Modules/GoogleTestAddTests.cmake
index 65af4c2..499332f 100644
--- a/Modules/GoogleTestAddTests.cmake
+++ b/Modules/GoogleTestAddTests.cmake
@@ -134,6 +134,7 @@ function(gtest_discover_tests_impl)
"${prefix}${pretty_suite}.${pretty_test}${suffix}"
PROPERTIES
WORKING_DIRECTORY "${_TEST_WORKING_DIR}"
+ SKIP_REGULAR_EXPRESSION "\\\\[ SKIPPED \\\\]"
${properties}
)
list(APPEND tests_buffer "${prefix}${pretty_suite}.${pretty_test}${suffix}")