mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-30 18:29:37 -06:00
GoogleTest: Avoid extra call to set DISABLED test property in discovery
For very long test names, this can noticeably reduce the size of the generated file contents when tests are disabled. This change reduces how far beyond the flush threshold the content can grow before being flushed. Issue: #26431
This commit is contained in:
@@ -214,16 +214,15 @@ function(gtest_discover_tests_impl)
|
||||
endif()
|
||||
string(APPEND script ")\n")
|
||||
|
||||
set(maybe_disabled "")
|
||||
if(suite MATCHES "^DISABLED_" OR test MATCHES "^DISABLED_")
|
||||
add_command(set_tests_properties
|
||||
"${guarded_testname}"
|
||||
PROPERTIES DISABLED TRUE
|
||||
)
|
||||
set(maybe_disabled DISABLED TRUE)
|
||||
endif()
|
||||
|
||||
add_command(set_tests_properties
|
||||
"${guarded_testname}"
|
||||
PROPERTIES
|
||||
${maybe_disabled}
|
||||
WORKING_DIRECTORY "${arg_TEST_WORKING_DIR}"
|
||||
SKIP_REGULAR_EXPRESSION "\\[ SKIPPED \\]"
|
||||
${arg_TEST_PROPERTIES}
|
||||
|
||||
Reference in New Issue
Block a user