2022-08-12 14:24:32 +08:00
|
|
|
set(test_prefix memgraph__simulation__)
|
|
|
|
|
|
|
|
find_package(gflags)
|
2022-09-20 17:15:19 +08:00
|
|
|
find_package(Boost REQUIRED)
|
|
|
|
find_package(OpenSSL REQUIRED)
|
2022-08-12 14:24:32 +08:00
|
|
|
|
|
|
|
add_custom_target(memgraph__simulation)
|
|
|
|
|
2022-09-20 17:15:19 +08:00
|
|
|
function(add_simulation_test test_cpp)
|
2022-08-12 14:24:32 +08:00
|
|
|
# get exec name (remove extension from the abs path)
|
|
|
|
get_filename_component(exec_name ${test_cpp} NAME_WE)
|
|
|
|
set(target_name ${test_prefix}${exec_name})
|
|
|
|
add_executable(${target_name} ${test_cpp})
|
|
|
|
|
|
|
|
# OUTPUT_NAME sets the real name of a target when it is built and can be
|
|
|
|
# used to help create two targets of the same name even though CMake
|
|
|
|
# requires unique logical target names
|
|
|
|
set_target_properties(${target_name} PROPERTIES OUTPUT_NAME ${exec_name})
|
2022-09-22 21:05:43 +08:00
|
|
|
|
2022-12-12 17:53:07 +08:00
|
|
|
target_link_libraries(${target_name} mg-communication mg-utils mg-io mg-io-simulator mg-coordinator mg-query-v2 mg-storage-v3)
|
2022-10-25 01:54:09 +08:00
|
|
|
target_link_libraries(${target_name} Boost::headers)
|
|
|
|
target_link_libraries(${target_name} gtest gtest_main gmock rapidcheck rapidcheck_gtest)
|
2022-08-12 14:24:32 +08:00
|
|
|
|
|
|
|
# register test
|
|
|
|
add_test(${target_name} ${exec_name})
|
|
|
|
add_dependencies(memgraph__simulation ${target_name})
|
|
|
|
endfunction(add_simulation_test)
|
|
|
|
|
2022-10-25 01:54:09 +08:00
|
|
|
add_simulation_test(basic_request.cpp)
|
|
|
|
add_simulation_test(raft.cpp)
|
|
|
|
add_simulation_test(trial_query_storage/query_storage_test.cpp)
|
|
|
|
add_simulation_test(sharded_map.cpp)
|
2022-09-20 17:15:19 +08:00
|
|
|
add_simulation_test(shard_rsm.cpp)
|
2022-10-25 01:54:09 +08:00
|
|
|
add_simulation_test(cluster_property_test.cpp)
|
2022-12-16 00:02:01 +08:00
|
|
|
add_simulation_test(cluster_property_test_cypher_queries.cpp)
|
2022-12-01 23:19:00 +08:00
|
|
|
add_simulation_test(request_router.cpp)
|