From 98868dad1c00ceb60eec81b9e20d684ff3c61a85 Mon Sep 17 00:00:00 2001 From: Alexander Stein Date: Wed, 8 Apr 2020 19:51:44 +0200 Subject: 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 --- Modules/GoogleTestAddTests.cmake | 1 + 1 file changed, 1 insertion(+) 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}") -- cgit v0.12