2018-05-29 17:13:13 +08:00
|
|
|
set(test_prefix memgraph__unit__)
|
2016-12-16 21:05:04 +08:00
|
|
|
|
2018-01-15 19:19:55 +08:00
|
|
|
add_custom_target(memgraph__unit)
|
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
function(add_unit_test test_cpp)
|
|
|
|
# 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})
|
2018-10-31 17:22:51 +08:00
|
|
|
target_link_libraries(${target_name} gtest gmock gtest_main Threads::Threads)
|
2018-05-29 17:13:13 +08:00
|
|
|
# register test
|
2019-04-25 19:37:26 +08:00
|
|
|
add_test(${target_name} ${exec_name})
|
2018-05-29 17:13:13 +08:00
|
|
|
# add to memgraph__unit target
|
|
|
|
add_dependencies(memgraph__unit ${target_name})
|
|
|
|
endfunction(add_unit_test)
|
|
|
|
|
2018-12-12 00:13:28 +08:00
|
|
|
add_unit_test(ast_serialization.cpp)
|
|
|
|
target_link_libraries(${test_prefix}ast_serialization mg-distributed kvstore_dummy_lib)
|
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
add_unit_test(bolt_encoder.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}bolt_encoder mg-single-node kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
2019-02-14 15:54:17 +08:00
|
|
|
add_unit_test(cache.cpp)
|
|
|
|
target_link_libraries(${test_prefix}cache mg-distributed kvstore_dummy_lib)
|
|
|
|
|
2019-06-27 18:37:56 +08:00
|
|
|
add_unit_test(commit_log_v2.cpp)
|
|
|
|
target_link_libraries(${test_prefix}commit_log_v2 glog gflags)
|
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
add_unit_test(concurrent_id_mapper_distributed.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}concurrent_id_mapper_distributed mg-distributed kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(concurrent_id_mapper_single_node.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}concurrent_id_mapper_single_node mg-single-node kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(concurrent_map_access.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}concurrent_map_access mg-single-node kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(concurrent_map.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}concurrent_map mg-single-node kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(cypher_main_visitor.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}cypher_main_visitor mg-single-node kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
2019-05-07 21:10:28 +08:00
|
|
|
add_unit_test(database_dump.cpp)
|
|
|
|
target_link_libraries(${test_prefix}database_dump mg-single-node kvstore_dummy_lib)
|
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
add_unit_test(database_key_index.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}database_key_index mg-single-node kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(database_label_property_index.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}database_label_property_index mg-single-node kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(database_master.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}database_master mg-distributed kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(database_transaction_timeout.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}database_transaction_timeout mg-single-node kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(datastructure_union_find.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}datastructure_union_find mg-single-node kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(deferred_deleter.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}deferred_deleter mg-single-node kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(distributed_coordination.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}distributed_coordination mg-distributed kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(distributed_data_exchange.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}distributed_data_exchange mg-distributed kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
2018-08-28 22:28:35 +08:00
|
|
|
add_unit_test(distributed_dgp_vertex_migrator.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}distributed_dgp_vertex_migrator mg-distributed kvstore_dummy_lib)
|
2018-08-28 22:28:35 +08:00
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
add_unit_test(distributed_durability.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}distributed_durability mg-distributed kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
2018-09-07 21:59:10 +08:00
|
|
|
add_unit_test(distributed_dynamic_worker.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}distributed_dynamic_worker mg-distributed kvstore_dummy_lib)
|
2018-09-07 21:59:10 +08:00
|
|
|
|
2019-02-26 15:41:16 +08:00
|
|
|
add_unit_test(distributed_edges_iterator.cpp)
|
|
|
|
target_link_libraries(${test_prefix}distributed_edges_iterator mg-distributed kvstore_dummy_lib)
|
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
add_unit_test(distributed_gc.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}distributed_gc mg-distributed kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(distributed_graph_db.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}distributed_graph_db mg-distributed kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(distributed_interpretation.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}distributed_interpretation mg-distributed kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
2019-01-25 22:45:13 +08:00
|
|
|
add_unit_test(distributed_plan_pretty_print.cpp)
|
|
|
|
target_link_libraries(${test_prefix}distributed_plan_pretty_print mg-distributed kvstore_dummy_lib)
|
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
add_unit_test(distributed_query_plan.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}distributed_query_plan mg-distributed kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
2018-07-06 21:12:45 +08:00
|
|
|
add_unit_test(distributed_reset.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}distributed_reset mg-distributed kvstore_dummy_lib)
|
2018-07-06 21:12:45 +08:00
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
add_unit_test(distributed_serialization.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}distributed_serialization mg-distributed kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(distributed_updates.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}distributed_updates mg-distributed kvstore_dummy_lib)
|
2018-07-05 16:55:00 +08:00
|
|
|
|
2018-09-08 01:45:09 +08:00
|
|
|
# TODO (buda): Replace token sharing with centralized solution and write an appropriate test.
|
|
|
|
# add_unit_test(distributed_token_sharing.cpp)
|
|
|
|
# target_link_libraries(${test_prefix}distributed_token_sharing memgraph_lib kvstore_dummy_lib)
|
|
|
|
|
2018-09-28 22:29:27 +08:00
|
|
|
add_unit_test(bfs_distributed.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}bfs_distributed mg-distributed kvstore_dummy_lib)
|
2018-09-28 22:29:27 +08:00
|
|
|
|
|
|
|
add_unit_test(bfs_single_node.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}bfs_single_node mg-single-node kvstore_dummy_lib)
|
2018-09-28 22:29:27 +08:00
|
|
|
|
2018-09-08 01:45:09 +08:00
|
|
|
add_unit_test(distributed_dgp_partitioner.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}distributed_dgp_partitioner mg-distributed kvstore_dummy_lib)
|
2018-09-08 01:45:09 +08:00
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
add_unit_test(durability.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}durability mg-single-node kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(dynamic_bitset.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}dynamic_bitset mg-single-node kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
2019-01-14 23:27:09 +08:00
|
|
|
add_unit_test(edges_distributed.cpp)
|
|
|
|
target_link_libraries(${test_prefix}edges_distributed mg-distributed kvstore_dummy_lib)
|
|
|
|
|
|
|
|
add_unit_test(edges_single_node.cpp)
|
|
|
|
target_link_libraries(${test_prefix}edges_single_node mg-single-node kvstore_dummy_lib)
|
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
add_unit_test(gid.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}gid mg-distributed kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(graph_db_accessor.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}graph_db_accessor mg-single-node kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(graph_db_accessor_index_api.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}graph_db_accessor_index_api mg-single-node kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(graph_db.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}graph_db mg-single-node kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(interpreter.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}interpreter mg-single-node kvstore_dummy_lib)
|
2018-06-12 17:29:22 +08:00
|
|
|
|
|
|
|
add_unit_test(kvstore.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}kvstore kvstore_lib glog)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(metrics.cpp)
|
2019-02-11 20:32:09 +08:00
|
|
|
target_link_libraries(${test_prefix}metrics mg-stats)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(mvcc.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}mvcc mg-single-node kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(mvcc_find.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}mvcc_find mg-single-node kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(mvcc_gc.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}mvcc_gc mg-single-node kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(mvcc_one_transaction.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}mvcc_one_transaction mg-single-node kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(mvcc_parallel_update.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}mvcc_parallel_update mg-single-node kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
2018-06-12 17:29:22 +08:00
|
|
|
add_unit_test(pod_buffer.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}pod_buffer mg-single-node kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(property_value_store.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}property_value_store kvstore_lib mg-single-node)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
2018-12-18 21:31:55 +08:00
|
|
|
add_unit_test(replication_log.cpp)
|
|
|
|
target_link_libraries(${test_prefix}replication_log mg-single-node-ha kvstore_lib glog)
|
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
add_unit_test(query_cost_estimator.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}query_cost_estimator mg-single-node kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(query_expression_evaluator.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}query_expression_evaluator mg-single-node kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
2019-01-25 22:45:13 +08:00
|
|
|
add_unit_test(plan_pretty_print.cpp)
|
|
|
|
target_link_libraries(${test_prefix}plan_pretty_print mg-single-node kvstore_dummy_lib)
|
|
|
|
|
2018-11-07 17:54:35 +08:00
|
|
|
add_unit_test(query_pretty_print.cpp)
|
|
|
|
target_link_libraries(${test_prefix}query_pretty_print mg-single-node kvstore_dummy_lib)
|
|
|
|
|
2019-01-17 19:28:32 +08:00
|
|
|
add_unit_test(query_profile.cpp)
|
|
|
|
target_link_libraries(${test_prefix}query_profile mg-single-node kvstore_dummy_lib)
|
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
add_unit_test(query_plan_accumulate_aggregate.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}query_plan_accumulate_aggregate mg-single-node kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(query_plan_bag_semantics.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}query_plan_bag_semantics mg-single-node kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(query_plan_create_set_remove_delete.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}query_plan_create_set_remove_delete mg-single-node kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(query_plan_edge_cases.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}query_plan_edge_cases mg-single-node kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(query_plan_match_filter_return.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}query_plan_match_filter_return mg-single-node kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
2018-10-09 22:25:57 +08:00
|
|
|
add_unit_test(query_plan.cpp)
|
|
|
|
target_link_libraries(${test_prefix}query_plan mg-single-node kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
2018-08-16 16:13:04 +08:00
|
|
|
add_unit_test(query_required_privileges.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}query_required_privileges mg-single-node kvstore_dummy_lib)
|
2018-08-16 16:13:04 +08:00
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
add_unit_test(query_semantic.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}query_semantic mg-single-node kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(query_variable_start_planner.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}query_variable_start_planner mg-single-node kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(queue.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}queue mg-single-node kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(record_edge_vertex_accessor.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}record_edge_vertex_accessor mg-single-node kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
2019-01-14 18:11:51 +08:00
|
|
|
add_unit_test(skip_list.cpp)
|
|
|
|
target_link_libraries(${test_prefix}skip_list mg-utils)
|
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
add_unit_test(skiplist_access.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}skiplist_access mg-single-node kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(skiplist_gc.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}skiplist_gc mg-single-node kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(skiplist_position_and_count.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}skiplist_position_and_count mg-single-node kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(skiplist_reverse_iteration.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}skiplist_reverse_iteration mg-single-node kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(skiplist_suffix.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}skiplist_suffix mg-single-node kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
2018-11-08 20:27:52 +08:00
|
|
|
add_unit_test(slk_advanced.cpp)
|
2018-12-07 21:02:53 +08:00
|
|
|
target_link_libraries(${test_prefix}slk_advanced mg-distributed kvstore_dummy_lib)
|
2018-11-08 20:27:52 +08:00
|
|
|
|
|
|
|
add_unit_test(slk_core.cpp)
|
2019-05-02 20:24:11 +08:00
|
|
|
target_link_libraries(${test_prefix}slk_core mg-slk glog gflags fmt)
|
|
|
|
|
|
|
|
add_unit_test(slk_streams.cpp)
|
|
|
|
target_link_libraries(${test_prefix}slk_streams mg-slk glog gflags fmt)
|
2018-11-08 20:27:52 +08:00
|
|
|
|
2018-11-14 21:11:20 +08:00
|
|
|
add_unit_test(small_vector.cpp)
|
|
|
|
target_link_libraries(${test_prefix}small_vector mg-utils)
|
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
add_unit_test(state_delta.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}state_delta mg-single-node kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(static_bitset.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}static_bitset mg-single-node kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(storage_address.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}storage_address mg-distributed kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
2018-11-15 15:30:01 +08:00
|
|
|
add_unit_test(storage_stat.cpp)
|
|
|
|
target_link_libraries(${test_prefix}storage_stat mg-single-node kvstore_dummy_lib)
|
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
add_unit_test(stripped.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}stripped mg-single-node kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(transaction_engine_distributed.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}transaction_engine_distributed mg-distributed kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_unit_test(transaction_engine_single_node.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}transaction_engine_single_node mg-single-node kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
2018-11-30 21:32:32 +08:00
|
|
|
add_unit_test(transaction_engine_single_node_ha.cpp)
|
|
|
|
target_link_libraries(${test_prefix}transaction_engine_single_node_ha mg-single-node-ha kvstore_dummy_lib)
|
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
add_unit_test(typed_value.cpp)
|
2018-10-04 21:23:07 +08:00
|
|
|
target_link_libraries(${test_prefix}typed_value mg-single-node kvstore_dummy_lib)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
2019-05-13 21:26:56 +08:00
|
|
|
add_unit_test(unique_constraints.cpp)
|
|
|
|
target_link_libraries(${test_prefix}unique_constraints mg-single-node kvstore_dummy_lib)
|
2019-04-08 15:14:04 +08:00
|
|
|
|
Extract communication to static library
Summary:
Session specifics have been move out of the Bolt `executing` state, and
are accessed via pure virtual Session type. Our server is templated on
the session and we are setting the concrete type, so there should be no
virtual call overhead. Abstract Session is used to indicate the
interface, this could have also been templated, but the explicit
interface definition makes it clearer.
Specific session implementation for running Memgraph is now implemented
in memgraph_bolt, which instantiates the concrete session type. This may
not be 100% appropriate place, but Memgraph specific session isn't
needed anywhere else.
Bolt/communication tests now use a dummy session and depend only on
communication, which significantly improves test run times.
All these changes make the communication a library which doesn't depend
on storage nor the database. Only shared connection points, which aren't
part of the base communication library are:
* glue/conversion -- which converts between storage and bolt types, and
* communication/result_stream_faker -- templated, but used in tests and query/repl
Depends on D1453
Reviewers: mferencevic, buda, mtomic, msantl
Reviewed By: mferencevic, mtomic
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D1456
2018-07-10 22:18:19 +08:00
|
|
|
# Test mg-communication
|
|
|
|
|
|
|
|
add_unit_test(bolt_chunked_decoder_buffer.cpp)
|
|
|
|
target_link_libraries(${test_prefix}bolt_chunked_decoder_buffer mg-communication)
|
|
|
|
|
|
|
|
add_unit_test(bolt_chunked_encoder_buffer.cpp)
|
|
|
|
target_link_libraries(${test_prefix}bolt_chunked_encoder_buffer mg-communication)
|
|
|
|
|
|
|
|
add_unit_test(bolt_decoder.cpp)
|
|
|
|
target_link_libraries(${test_prefix}bolt_decoder mg-communication)
|
|
|
|
|
|
|
|
add_unit_test(bolt_session.cpp)
|
|
|
|
target_link_libraries(${test_prefix}bolt_session mg-communication)
|
|
|
|
|
|
|
|
add_unit_test(communication_buffer.cpp)
|
|
|
|
target_link_libraries(${test_prefix}communication_buffer mg-communication)
|
|
|
|
|
|
|
|
add_unit_test(network_timeouts.cpp)
|
|
|
|
target_link_libraries(${test_prefix}network_timeouts mg-communication)
|
|
|
|
|
|
|
|
add_unit_test(rpc.cpp)
|
2019-02-06 19:29:04 +08:00
|
|
|
target_link_libraries(${test_prefix}rpc mg-comm-rpc)
|
Extract communication to static library
Summary:
Session specifics have been move out of the Bolt `executing` state, and
are accessed via pure virtual Session type. Our server is templated on
the session and we are setting the concrete type, so there should be no
virtual call overhead. Abstract Session is used to indicate the
interface, this could have also been templated, but the explicit
interface definition makes it clearer.
Specific session implementation for running Memgraph is now implemented
in memgraph_bolt, which instantiates the concrete session type. This may
not be 100% appropriate place, but Memgraph specific session isn't
needed anywhere else.
Bolt/communication tests now use a dummy session and depend only on
communication, which significantly improves test run times.
All these changes make the communication a library which doesn't depend
on storage nor the database. Only shared connection points, which aren't
part of the base communication library are:
* glue/conversion -- which converts between storage and bolt types, and
* communication/result_stream_faker -- templated, but used in tests and query/repl
Depends on D1453
Reviewers: mferencevic, buda, mtomic, msantl
Reviewed By: mferencevic, mtomic
Subscribers: pullbot
Differential Revision: https://phabricator.memgraph.io/D1456
2018-07-10 22:18:19 +08:00
|
|
|
|
2018-05-30 19:00:25 +08:00
|
|
|
# Test data structures
|
|
|
|
|
|
|
|
add_unit_test(ring_buffer.cpp)
|
|
|
|
target_link_libraries(${test_prefix}ring_buffer mg-utils)
|
|
|
|
|
|
|
|
# Test mg-io
|
|
|
|
|
|
|
|
add_unit_test(network_endpoint.cpp)
|
|
|
|
target_link_libraries(${test_prefix}network_endpoint mg-io)
|
2018-10-04 21:23:07 +08:00
|
|
|
|
2018-05-30 19:00:25 +08:00
|
|
|
add_unit_test(network_utils.cpp)
|
|
|
|
target_link_libraries(${test_prefix}network_utils mg-io)
|
|
|
|
|
2018-10-04 21:23:07 +08:00
|
|
|
add_unit_test(socket.cpp)
|
|
|
|
target_link_libraries(${test_prefix}socket mg-io)
|
2018-05-30 19:00:25 +08:00
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
# Test mg-utils
|
|
|
|
|
2018-06-29 20:58:10 +08:00
|
|
|
add_unit_test(utils_algorithm.cpp)
|
|
|
|
target_link_libraries(${test_prefix}utils_algorithm mg-utils)
|
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
add_unit_test(utils_demangle.cpp)
|
|
|
|
target_link_libraries(${test_prefix}utils_demangle mg-utils)
|
2016-12-16 21:05:04 +08:00
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
add_unit_test(utils_exceptions.cpp)
|
|
|
|
target_link_libraries(${test_prefix}utils_exceptions mg-utils)
|
2016-12-16 21:05:04 +08:00
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
add_unit_test(utils_executor.cpp)
|
|
|
|
target_link_libraries(${test_prefix}utils_executor mg-utils)
|
2016-12-16 21:05:04 +08:00
|
|
|
|
2019-02-14 17:34:09 +08:00
|
|
|
add_unit_test(utils_file.cpp)
|
|
|
|
target_link_libraries(${test_prefix}utils_file mg-utils)
|
|
|
|
|
2019-01-17 20:46:01 +08:00
|
|
|
add_unit_test(utils_math.cpp)
|
|
|
|
target_link_libraries(${test_prefix}utils_math mg-utils)
|
|
|
|
|
2019-04-29 22:02:08 +08:00
|
|
|
add_unit_test(utils_memory.cpp)
|
|
|
|
target_link_libraries(${test_prefix}utils_memory mg-utils)
|
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
add_unit_test(utils_on_scope_exit.cpp)
|
|
|
|
target_link_libraries(${test_prefix}utils_on_scope_exit mg-utils)
|
2016-12-16 21:05:04 +08:00
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
add_unit_test(utils_scheduler.cpp)
|
|
|
|
target_link_libraries(${test_prefix}utils_scheduler mg-utils)
|
2016-12-16 21:05:04 +08:00
|
|
|
|
2018-05-30 19:00:25 +08:00
|
|
|
add_unit_test(utils_rwlock.cpp)
|
|
|
|
target_link_libraries(${test_prefix}utils_rwlock mg-utils)
|
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
add_unit_test(utils_signals.cpp)
|
|
|
|
target_link_libraries(${test_prefix}utils_signals mg-utils)
|
2016-12-16 21:05:04 +08:00
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
add_unit_test(utils_string.cpp)
|
|
|
|
target_link_libraries(${test_prefix}utils_string mg-utils)
|
2016-12-16 21:05:04 +08:00
|
|
|
|
2018-05-30 19:00:25 +08:00
|
|
|
add_unit_test(utils_thread_pool.cpp)
|
|
|
|
target_link_libraries(${test_prefix}utils_thread_pool mg-utils)
|
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
add_unit_test(utils_timestamp.cpp)
|
|
|
|
target_link_libraries(${test_prefix}utils_timestamp mg-utils)
|
2018-01-15 19:19:55 +08:00
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
add_unit_test(utils_watchdog.cpp)
|
|
|
|
target_link_libraries(${test_prefix}utils_watchdog mg-utils)
|
2018-07-27 16:54:20 +08:00
|
|
|
|
|
|
|
# Test mg-auth
|
|
|
|
|
|
|
|
add_unit_test(auth.cpp)
|
|
|
|
target_link_libraries(${test_prefix}auth mg-auth kvstore_lib)
|
2018-10-15 17:01:57 +08:00
|
|
|
|
2019-06-26 22:01:51 +08:00
|
|
|
# Test storage v2
|
|
|
|
|
2019-07-01 15:32:25 +08:00
|
|
|
add_unit_test(property_value_v2.cpp)
|
|
|
|
target_link_libraries(${test_prefix}property_value_v2 mg-utils)
|
|
|
|
|
2019-06-26 22:01:51 +08:00
|
|
|
add_unit_test(storage_v2.cpp)
|
2019-07-03 21:32:03 +08:00
|
|
|
target_link_libraries(${test_prefix}storage_v2 mg-storage-v2)
|
2019-06-26 22:01:51 +08:00
|
|
|
|
2018-10-15 17:01:57 +08:00
|
|
|
# Test LCP
|
|
|
|
|
2018-10-19 19:08:16 +08:00
|
|
|
add_custom_command(
|
|
|
|
OUTPUT test_lcp
|
2019-05-24 20:16:42 +08:00
|
|
|
DEPENDS ${lcp_src_files} lcp test_lcp.lisp
|
2018-10-19 19:08:16 +08:00
|
|
|
COMMAND sbcl --script ${CMAKE_CURRENT_SOURCE_DIR}/test_lcp.lisp)
|
|
|
|
add_custom_target(test_lcp ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/test_lcp)
|
2018-10-15 17:01:57 +08:00
|
|
|
add_test(test_lcp ${CMAKE_CURRENT_BINARY_DIR}/test_lcp)
|
|
|
|
add_dependencies(memgraph__unit test_lcp)
|