cmake: Set `LABELS` property for tests
What changed, and why it matters
This commit only adds descriptive labels to test cases in the project's CMake build configuration. It does not change any cryptographic code, runtime behavior, or security-sensitive logic. There is no security issue here.
No action required. This is a benign build-system improvement.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch sets the CMake LABELS property on test targets: secp256k1_example for examples, secp256k1_${exe_name} for discovered tests, and secp256k1_exhaustive for exhaustive tests. This is a pure build/test metadata change with no functional or security implications.
Changed components
examples/CMakeLists.txtsrc/CMakeLists.txtInspect captured patch +8 / −0
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 86172f8..808917c 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -9,6 +9,9 @@ function(add_example name)
$<$<PLATFORM_ID:Windows>:bcrypt>
)
add_test(NAME secp256k1.example.${name} COMMAND ${target_name})
+ set_tests_properties(secp256k1.example.${name} PROPERTIES
+ LABELS secp256k1_example
+ )
endfunction()
add_example(ecdsa)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 6186369..f80573c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -154,6 +154,8 @@ if(SECP256K1_BUILD_TESTS)
DISCOVERY_MATCH "^\\t\\\\[ *[0-9]+\\\\] ([^ ].*)$"
TEST_NAME_REPLACEMENT "secp256k1.${exe_name}.\\\\1"
TEST_ARGS_REPLACEMENT "--target=\\\\1 --log=1"
+ PROPERTIES
+ LABELS "secp256k1_${exe_name}"
)
endfunction()
@@ -170,6 +172,9 @@ if(SECP256K1_BUILD_EXHAUSTIVE_TESTS)
target_link_libraries(exhaustive_tests secp256k1_asm)
target_compile_definitions(exhaustive_tests PRIVATE $<$<NOT:$<CONFIG:Coverage>>:VERIFY>)
add_test(NAME secp256k1.exhaustive_tests COMMAND exhaustive_tests)
+ set_tests_properties(secp256k1.exhaustive_tests PROPERTIES
+ LABELS secp256k1_exhaustive
+ )
endif()
if(SECP256K1_BUILD_CTIME_TESTS)
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.