From fd9d247dd2ce2bd0d1d10ee394bd84f9e7e55b23 Mon Sep 17 00:00:00 2001 From: crasm Date: Mon, 18 Dec 2023 04:23:20 -0500 Subject: [PATCH] Label all ctest tests --- tests/CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index e854d27d9..81a02dae9 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -8,14 +8,20 @@ endfunction() function(llama_test_executable name source) get_filename_component(TEST_TARGET ${source} NAME_WE) add_test(NAME ${name} COMMAND $ ${ARGN}) + set_property(TEST ${name} PROPERTY LABELS "main") endfunction() function(llama_build_and_test_executable source) + llama_build_and_test_executable_with_label(${source} "main") +endfunction() + +function(llama_build_and_test_executable_with_label source label) get_filename_component(TEST_TARGET ${source} NAME_WE) add_executable(${TEST_TARGET} ${source}) install(TARGETS ${TEST_TARGET} RUNTIME) target_link_libraries(${TEST_TARGET} PRIVATE llama common) add_test(NAME ${TEST_TARGET} COMMAND $ ${ARGN}) + set_property(TEST ${TEST_TARGET} PROPERTY LABELS ${label}) endfunction() # llama_build_and_test_executable(test-double-float.cpp) # SLOW @@ -50,7 +56,8 @@ llama_build_and_test_executable(test-grad0.cpp) llama_build_and_test_executable(test-backend-ops.cpp) llama_build_and_test_executable(test-rope.cpp) -llama_build_and_test_executable(test-model-load-cancel.cpp) + +llama_build_and_test_executable_with_label(test-model-load-cancel.cpp "model") # dummy executable - not installed get_filename_component(TEST_TARGET test-c.c NAME_WE)