Update test discovery

This commit is contained in:
scawful
2025-10-14 11:38:12 -04:00
parent e9e574cffc
commit 9dbba877c3

View File

@@ -61,12 +61,17 @@ if(YAZE_BUILD_TESTS)
endif() endif()
include(GoogleTest) include(GoogleTest)
gtest_discover_tests(${suite_name}) if(WIN32)
gtest_discover_tests(${suite_name}
# Get the list of tests discovered for the target and apply the label. WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
get_target_property(suite_tests ${suite_name} TESTS) DISCOVERY_TIMEOUT 60
if(suite_tests) PROPERTIES LABELS "${label}"
set_tests_properties(${suite_tests} PROPERTIES LABELS "${label}") )
else()
gtest_discover_tests(${suite_name}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
PROPERTIES LABELS "${label}"
)
endif() endif()
endfunction() endfunction()