mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-01 12:18:36 -06:00
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:
committed by
Brad King
parent
37fa5122c2
commit
98868dad1c
@@ -134,6 +134,7 @@ function(gtest_discover_tests_impl)
|
|||||||
"${prefix}${pretty_suite}.${pretty_test}${suffix}"
|
"${prefix}${pretty_suite}.${pretty_test}${suffix}"
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
WORKING_DIRECTORY "${_TEST_WORKING_DIR}"
|
WORKING_DIRECTORY "${_TEST_WORKING_DIR}"
|
||||||
|
SKIP_REGULAR_EXPRESSION "\\\\[ SKIPPED \\\\]"
|
||||||
${properties}
|
${properties}
|
||||||
)
|
)
|
||||||
list(APPEND tests_buffer "${prefix}${pretty_suite}.${pretty_test}${suffix}")
|
list(APPEND tests_buffer "${prefix}${pretty_suite}.${pretty_test}${suffix}")
|
||||||
|
|||||||
Reference in New Issue
Block a user