mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-20 00:20:47 +00:00
test/cmake: add missing tests to boost test suite
Add symmetric_key_test (standalone, links encryption library) and auth_cache_test to the combined_tests binary. These tests already exist in configure.py; this aligns the CMake build.
This commit is contained in:
@@ -41,42 +41,51 @@ function(add_scylla_test name)
|
||||
else()
|
||||
set(src "${name}.cc")
|
||||
endif()
|
||||
add_executable(${name} ${src})
|
||||
add_dependencies(tests ${name})
|
||||
|
||||
# CMake requires globally unique target names. Prefix with the
|
||||
# directory path (e.g., test/manual/hint_test → test_manual_hint_test)
|
||||
# to avoid collisions between suites, while keeping the output binary
|
||||
# name matching configure.py via OUTPUT_NAME.
|
||||
cmake_path(RELATIVE_PATH CMAKE_CURRENT_SOURCE_DIR
|
||||
BASE_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||
OUTPUT_VARIABLE dirname)
|
||||
string(REPLACE "/" "_" _target_prefix "${dirname}")
|
||||
set(target "${_target_prefix}_${name}")
|
||||
|
||||
add_executable(${target} ${src})
|
||||
set_target_properties(${target} PROPERTIES OUTPUT_NAME ${name})
|
||||
add_dependencies(tests ${target})
|
||||
|
||||
list(APPEND scylla_tests "${dirname}/${name}")
|
||||
set(scylla_tests "${scylla_tests}" PARENT_SCOPE)
|
||||
|
||||
target_include_directories(${name}
|
||||
target_include_directories(${target}
|
||||
PRIVATE
|
||||
${CMAKE_SOURCE_DIR})
|
||||
target_link_libraries(${name}
|
||||
target_link_libraries(${target}
|
||||
PRIVATE
|
||||
test-lib
|
||||
Seastar::seastar
|
||||
xxHash::xxhash)
|
||||
if(kind STREQUAL "SEASTAR")
|
||||
target_link_libraries(${name}
|
||||
target_link_libraries(${target}
|
||||
PRIVATE
|
||||
Seastar::seastar_testing)
|
||||
# SEASTAR_TESTING_MAIN is provided by add_compile_definitions() in
|
||||
# the top-level CMakeLists.txt, matching configure.py's global define.
|
||||
elseif(kind STREQUAL "BOOST")
|
||||
target_link_libraries(${name}
|
||||
target_link_libraries(${target}
|
||||
PRIVATE
|
||||
Boost::unit_test_framework)
|
||||
elseif(kind STREQUAL "UNIT")
|
||||
target_link_libraries(${name}
|
||||
target_link_libraries(${target}
|
||||
PRIVATE
|
||||
Seastar::seastar_testing)
|
||||
else()
|
||||
message(FATAL_ERROR "unknown test KIND: ${kind}")
|
||||
endif()
|
||||
if(parsed_args_LIBRARIES)
|
||||
target_link_libraries(${name}
|
||||
target_link_libraries(${target}
|
||||
PRIVATE
|
||||
${parsed_args_LIBRARIES})
|
||||
endif()
|
||||
|
||||
@@ -89,7 +89,6 @@ add_scylla_test(encrypted_file_test
|
||||
add_scylla_test(encryption_at_rest_test
|
||||
KIND SEASTAR
|
||||
LIBRARIES
|
||||
Boost::filesystem
|
||||
encryption)
|
||||
add_scylla_test(enum_option_test
|
||||
KIND BOOST)
|
||||
@@ -202,6 +201,8 @@ add_scylla_test(reservoir_sampling_test
|
||||
KIND BOOST)
|
||||
add_scylla_test(rest_client_test
|
||||
KIND SEASTAR)
|
||||
add_scylla_test(rolling_max_tracker_test
|
||||
KIND BOOST)
|
||||
add_scylla_test(rust_test
|
||||
KIND BOOST
|
||||
LIBRARIES inc)
|
||||
@@ -309,12 +310,17 @@ add_scylla_test(address_map_test
|
||||
KIND SEASTAR)
|
||||
add_scylla_test(object_storage_upload_test
|
||||
KIND SEASTAR)
|
||||
add_scylla_test(symmetric_key_test
|
||||
KIND SEASTAR
|
||||
LIBRARIES
|
||||
encryption)
|
||||
|
||||
add_scylla_test(combined_tests
|
||||
KIND SEASTAR
|
||||
SOURCES
|
||||
combined_tests.cc
|
||||
aggregate_fcts_test.cc
|
||||
auth_cache_test.cc
|
||||
auth_test.cc
|
||||
batchlog_manager_test.cc
|
||||
cache_algorithm_test.cc
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
add_scylla_test(ldap_connection_test
|
||||
KIND SEASTAR)
|
||||
add_scylla_test(ldap_role_manager_test
|
||||
KIND SEASTAR
|
||||
SOURCES role_manager_test.cc)
|
||||
add_scylla_test(role_manager_test
|
||||
KIND SEASTAR)
|
||||
add_scylla_test(saslauthd_authenticator_test
|
||||
KIND SEASTAR)
|
||||
|
||||
@@ -6,10 +6,9 @@ add_scylla_test(gce_snitch_test
|
||||
KIND SEASTAR)
|
||||
add_scylla_test(gossip
|
||||
KIND SEASTAR)
|
||||
add_scylla_test(manual_hint_test
|
||||
SOURCES hint_test.cc
|
||||
add_scylla_test(hint_test
|
||||
KIND SEASTAR)
|
||||
add_scylla_test(message_test
|
||||
add_scylla_test(message
|
||||
SOURCES message.cc
|
||||
KIND SEASTAR)
|
||||
add_scylla_test(partition_data_test
|
||||
|
||||
Reference in New Issue
Block a user