[Test] (CMake, CI): enable top-level testing and label tests (unit/benchmark/integration) so ctest runs from the build root

This commit is contained in:
2026-07-18 11:37:56 -04:00
parent 1d947d934b
commit 626c7f26fd
15 changed files with 32 additions and 20 deletions
+2 -1
View File
@@ -16,4 +16,5 @@ target_link_libraries(
${LINK_LIBRARIES}
)
add_test(NAME BufferBench COMMAND BufferBench --benchmark_counters_tabular=true)
add_test(NAME BufferBench COMMAND BufferBench --benchmark_counters_tabular=true)
set_tests_properties(BufferBench PROPERTIES LABELS benchmark)
+1
View File
@@ -38,6 +38,7 @@ target_link_libraries(
)
add_test(NAME SanityBench COMMAND SanityBench --benchmark_counters_tabular=true)
set_tests_properties(SanityBench PROPERTIES LABELS benchmark)
add_subdirectory(Program)
add_subdirectory(Buffer)
+2 -1
View File
@@ -16,4 +16,5 @@ target_link_libraries(
${LINK_LIBRARIES}
)
add_test(NAME ProgramBench COMMAND ProgramBench --benchmark_counters_tabular=true)
add_test(NAME ProgramBench COMMAND ProgramBench --benchmark_counters_tabular=true)
set_tests_properties(ProgramBench PROPERTIES LABELS benchmark)
@@ -49,7 +49,7 @@ endif()
target_compile_definitions(DirectVulkanSanityTest PRIVATE -DNOMINMAX)
include(GoogleTest)
gtest_discover_tests(DirectVulkanSanityTest DISCOVERY_TIMEOUT 30)
gtest_discover_tests(DirectVulkanSanityTest DISCOVERY_TIMEOUT 30 PROPERTIES LABELS integration)
add_executable(
DirectVulkanTestExec
@@ -17,4 +17,4 @@ target_link_libraries(
)
include(GoogleTest)
gtest_discover_tests(BackendLoaderTest DISCOVERY_TIMEOUT 30)
gtest_discover_tests(BackendLoaderTest DISCOVERY_TIMEOUT 30 PROPERTIES LABELS unit)
+1 -1
View File
@@ -24,4 +24,4 @@ if (MSVC)
endif()
include(GoogleTest)
gtest_discover_tests(BufferTest DISCOVERY_TIMEOUT 30)
gtest_discover_tests(BufferTest DISCOVERY_TIMEOUT 30 PROPERTIES LABELS unit)
+1 -1
View File
@@ -62,7 +62,7 @@ set(LINK_LIBRARIES
)
include(GoogleTest)
gtest_discover_tests(SanityTest DISCOVERY_TIMEOUT 30)
gtest_discover_tests(SanityTest DISCOVERY_TIMEOUT 30 PROPERTIES LABELS unit)
add_subdirectory(BackendLoader)
add_subdirectory(Buffer)
+1 -1
View File
@@ -17,4 +17,4 @@ target_link_libraries(
)
include(GoogleTest)
gtest_discover_tests(EGLStateTest DISCOVERY_TIMEOUT 30)
gtest_discover_tests(EGLStateTest DISCOVERY_TIMEOUT 30 PROPERTIES LABELS unit)
+1 -1
View File
@@ -17,4 +17,4 @@ target_link_libraries(
)
include(GoogleTest)
gtest_discover_tests(FramebufferTest DISCOVERY_TIMEOUT 30)
gtest_discover_tests(FramebufferTest DISCOVERY_TIMEOUT 30 PROPERTIES LABELS unit)
+2 -2
View File
@@ -39,5 +39,5 @@ target_link_libraries(
)
include(GoogleTest)
gtest_discover_tests(ProgramUtilTest DISCOVERY_TIMEOUT 30)
gtest_discover_tests(ProgramTest DISCOVERY_TIMEOUT 30)
gtest_discover_tests(ProgramUtilTest DISCOVERY_TIMEOUT 30 PROPERTIES LABELS unit)
gtest_discover_tests(ProgramTest DISCOVERY_TIMEOUT 30 PROPERTIES LABELS unit)
+1 -1
View File
@@ -17,4 +17,4 @@ target_link_libraries(
)
include(GoogleTest)
gtest_discover_tests(QueryTest DISCOVERY_TIMEOUT 30)
gtest_discover_tests(QueryTest DISCOVERY_TIMEOUT 30 PROPERTIES LABELS unit)
+2 -2
View File
@@ -17,7 +17,7 @@ target_link_libraries(
)
include(GoogleTest)
gtest_discover_tests(TextureTest DISCOVERY_TIMEOUT 30)
gtest_discover_tests(TextureTest DISCOVERY_TIMEOUT 30 PROPERTIES LABELS unit)
add_executable(
VkClearManagerTest
@@ -35,4 +35,4 @@ target_link_libraries(
${LINK_LIBRARIES}
)
gtest_discover_tests(VkClearManagerTest DISCOVERY_TIMEOUT 30)
gtest_discover_tests(VkClearManagerTest DISCOVERY_TIMEOUT 30 PROPERTIES LABELS unit)
+1 -1
View File
@@ -17,4 +17,4 @@ target_link_libraries(
)
include(GoogleTest)
gtest_discover_tests(VertexArrayTest DISCOVERY_TIMEOUT 30)
gtest_discover_tests(VertexArrayTest DISCOVERY_TIMEOUT 30 PROPERTIES LABELS unit)