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
This commit is contained in:
Alexander Stein 2020-04-08 19:51:44 +02:00 committed by Brad King
parent 37fa5122c2
commit 98868dad1c

View File

@ -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}")