소스 검색

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
Alexander Stein 5 년 전
부모
커밋
98868dad1c
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      Modules/GoogleTestAddTests.cmake

+ 1 - 0
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}")