build: cmake: add test

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
This commit is contained in:
Kefu Chai
2023-02-16 11:59:14 +08:00
parent f5750859f7
commit 02de9f1833
2 changed files with 37 additions and 0 deletions

View File

@@ -18,6 +18,7 @@ add_compile_definitions(${Seastar_DEFINITIONS_${build_mode}})
set(CMAKE_CXX_STANDARD "20" CACHE INTERNAL "")
set(CMAKE_CXX_EXTENSIONS ON CACHE INTERNAL "")
set(Seastar_TESTING ON CACHE BOOL "" FORCE)
add_subdirectory(seastar)
# System libraries dependencies
@@ -391,6 +392,7 @@ add_subdirectory(api)
add_subdirectory(alternator)
add_subdirectory(cql3)
add_subdirectory(idl)
add_subdirectory(test)
add_subdirectory(rust)
add_executable(scylla
@@ -402,6 +404,7 @@ target_link_libraries(scylla PRIVATE
alternator
cql3
idl
test-perf
wasmtime_bindings)
target_link_libraries(scylla PRIVATE

34
test/CMakeLists.txt Normal file
View File

@@ -0,0 +1,34 @@
find_package(jsoncpp REQUIRED)
add_library(test-perf STATIC)
target_sources(test-perf
PRIVATE
perf/perf_fast_forward.cc
perf/perf_row_cache_update.cc
perf/perf_simple_query.cc
perf/perf_sstable.cc
perf/perf.cc
lib/alternator_test_env.cc
lib/cql_test_env.cc
lib/log.cc
lib/test_services.cc
lib/test_utils.cc
lib/tmpdir.cc
lib/key_utils.cc
lib/random_schema.cc
lib/data_model.cc)
target_include_directories(test-perf
PUBLIC
${CMAKE_SOURCE_DIR})
if(NOT TARGET Seastar::seastar_perf_testing)
add_library(Seastar::seastar_perf_testing)
target_sources(
tests/perf/linux_perf_event.cc)
endif()
target_link_libraries(test-perf
PRIVATE
idl
Seastar::seastar_perf_testing
JsonCpp::JsonCpp
xxHash::xxhash
wasmtime_bindings)