Skip to content

Commit c08bb65

Browse files
committed
cmake: Set LABELS property for tests
1 parent 1e2cb05 commit c08bb65

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

examples/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ function(add_example name)
88
secp256k1
99
$<$<PLATFORM_ID:Windows>:bcrypt>
1010
)
11-
set(test_name ${name}_example)
12-
add_test(NAME secp256k1_${test_name} COMMAND ${target_name})
11+
add_test(NAME secp256k1_example::${name} COMMAND ${target_name})
12+
set_tests_properties(secp256k1_example::${name} PROPERTIES
13+
LABELS secp256k1_example
14+
)
1315
endfunction()
1416

1517
add_example(ecdsa)

src/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ if(SECP256K1_BUILD_TESTS)
181181
COMMAND_EXPAND_LISTS
182182
)
183183
set_tests_properties(${label}::${test_name} PROPERTIES
184+
LABELS ${label}
184185
SKIP_REGULAR_EXPRESSION "module disabled"
185186
)
186187
endforeach()
@@ -198,7 +199,10 @@ if(SECP256K1_BUILD_EXHAUSTIVE_TESTS)
198199
add_executable(exhaustive_tests tests_exhaustive.c)
199200
target_link_libraries(exhaustive_tests secp256k1_asm)
200201
target_compile_definitions(exhaustive_tests PRIVATE $<$<NOT:$<CONFIG:Coverage>>:VERIFY>)
201-
add_test(NAME secp256k1_exhaustive_tests COMMAND exhaustive_tests)
202+
add_test(NAME secp256k1_exhaustive COMMAND exhaustive_tests)
203+
set_tests_properties(secp256k1_exhaustive PROPERTIES
204+
LABELS secp256k1_exhaustive
205+
)
202206
endif()
203207

204208
if(SECP256K1_BUILD_CTIME_TESTS)

0 commit comments

Comments
 (0)