cmake, test: Add secp256k1_ prefix to test names

This change improves regex matching options when using `ctest` in
downstream projects.
This commit is contained in:
Hennadii Stepanov
2024-08-12 12:07:45 +01:00
parent e59158b6eb
commit 87384f5c0f
2 changed files with 4 additions and 4 deletions

View File

@@ -9,7 +9,7 @@ function(add_example name)
$<$<PLATFORM_ID:Windows>:bcrypt> $<$<PLATFORM_ID:Windows>:bcrypt>
) )
set(test_name ${name}_example) set(test_name ${name}_example)
add_test(NAME ${test_name} COMMAND ${target_name}) add_test(NAME secp256k1_${test_name} COMMAND ${target_name})
endfunction() endfunction()
add_example(ecdsa) add_example(ecdsa)

View File

@@ -87,12 +87,12 @@ endif()
if(SECP256K1_BUILD_TESTS) if(SECP256K1_BUILD_TESTS)
add_executable(noverify_tests tests.c) add_executable(noverify_tests tests.c)
target_link_libraries(noverify_tests secp256k1_precomputed secp256k1_asm) target_link_libraries(noverify_tests secp256k1_precomputed secp256k1_asm)
add_test(NAME noverify_tests COMMAND noverify_tests) add_test(NAME secp256k1_noverify_tests COMMAND noverify_tests)
if(NOT CMAKE_BUILD_TYPE STREQUAL "Coverage") if(NOT CMAKE_BUILD_TYPE STREQUAL "Coverage")
add_executable(tests tests.c) add_executable(tests tests.c)
target_compile_definitions(tests PRIVATE VERIFY) target_compile_definitions(tests PRIVATE VERIFY)
target_link_libraries(tests secp256k1_precomputed secp256k1_asm) target_link_libraries(tests secp256k1_precomputed secp256k1_asm)
add_test(NAME tests COMMAND tests) add_test(NAME secp256k1_tests COMMAND tests)
endif() endif()
endif() endif()
@@ -101,7 +101,7 @@ if(SECP256K1_BUILD_EXHAUSTIVE_TESTS)
add_executable(exhaustive_tests tests_exhaustive.c) add_executable(exhaustive_tests tests_exhaustive.c)
target_link_libraries(exhaustive_tests secp256k1_asm) target_link_libraries(exhaustive_tests secp256k1_asm)
target_compile_definitions(exhaustive_tests PRIVATE $<$<NOT:$<CONFIG:Coverage>>:VERIFY>) target_compile_definitions(exhaustive_tests PRIVATE $<$<NOT:$<CONFIG:Coverage>>:VERIFY>)
add_test(NAME exhaustive_tests COMMAND exhaustive_tests) add_test(NAME secp256k1_exhaustive_tests COMMAND exhaustive_tests)
endif() endif()
if(SECP256K1_BUILD_CTIME_TESTS) if(SECP256K1_BUILD_CTIME_TESTS)