Skip to content

Commit fd9d247

Browse files
committed
Label all ctest tests
1 parent 6bba341 commit fd9d247

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tests/CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,20 @@ endfunction()
88
function(llama_test_executable name source)
99
get_filename_component(TEST_TARGET ${source} NAME_WE)
1010
add_test(NAME ${name} COMMAND $<TARGET_FILE:${TEST_TARGET}> ${ARGN})
11+
set_property(TEST ${name} PROPERTY LABELS "main")
1112
endfunction()
1213

1314
function(llama_build_and_test_executable source)
15+
llama_build_and_test_executable_with_label(${source} "main")
16+
endfunction()
17+
18+
function(llama_build_and_test_executable_with_label source label)
1419
get_filename_component(TEST_TARGET ${source} NAME_WE)
1520
add_executable(${TEST_TARGET} ${source})
1621
install(TARGETS ${TEST_TARGET} RUNTIME)
1722
target_link_libraries(${TEST_TARGET} PRIVATE llama common)
1823
add_test(NAME ${TEST_TARGET} COMMAND $<TARGET_FILE:${TEST_TARGET}> ${ARGN})
24+
set_property(TEST ${TEST_TARGET} PROPERTY LABELS ${label})
1925
endfunction()
2026

2127
# llama_build_and_test_executable(test-double-float.cpp) # SLOW
@@ -50,7 +56,8 @@ llama_build_and_test_executable(test-grad0.cpp)
5056
llama_build_and_test_executable(test-backend-ops.cpp)
5157

5258
llama_build_and_test_executable(test-rope.cpp)
53-
llama_build_and_test_executable(test-model-load-cancel.cpp)
59+
60+
llama_build_and_test_executable_with_label(test-model-load-cancel.cpp "model")
5461

5562
# dummy executable - not installed
5663
get_filename_component(TEST_TARGET test-c.c NAME_WE)

0 commit comments

Comments
 (0)