Skip to content

Commit 2d8da55

Browse files
committed
cmake: Set LABELS property for tests
1 parent 7600f5f commit 2d8da55

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
@@ -172,6 +172,7 @@ if(SECP256K1_BUILD_TESTS)
172172
COMMAND_EXPAND_LISTS
173173
)
174174
set_tests_properties(${label}::${test_name} PROPERTIES
175+
LABELS ${label}
175176
SKIP_REGULAR_EXPRESSION "module disabled"
176177
)
177178
endforeach()
@@ -189,7 +190,10 @@ if(SECP256K1_BUILD_EXHAUSTIVE_TESTS)
189190
add_executable(exhaustive_tests tests_exhaustive.c)
190191
target_link_libraries(exhaustive_tests secp256k1_asm)
191192
target_compile_definitions(exhaustive_tests PRIVATE $<$<NOT:$<CONFIG:Coverage>>:VERIFY>)
192-
add_test(NAME secp256k1_exhaustive_tests COMMAND exhaustive_tests)
193+
add_test(NAME secp256k1_exhaustive COMMAND exhaustive_tests)
194+
set_tests_properties(secp256k1_exhaustive PROPERTIES
195+
LABELS secp256k1_exhaustive
196+
)
193197
endif()
194198

195199
if(SECP256K1_BUILD_CTIME_TESTS)

0 commit comments

Comments
 (0)