2018-05-29 17:13:13 +08:00
|
|
|
set(test_prefix memgraph__manual__)
|
2016-12-16 21:05:04 +08:00
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
add_custom_target(memgraph__manual)
|
2016-12-16 21:05:04 +08:00
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
function(add_manual_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})
|
2018-10-10 16:23:10 +08:00
|
|
|
add_executable(${target_name} ${test_cpp} ${ARGN})
|
2018-05-29 17:13:13 +08:00
|
|
|
# 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})
|
|
|
|
add_dependencies(memgraph__manual ${target_name})
|
|
|
|
endfunction(add_manual_test)
|
2016-12-16 21:05:04 +08:00
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
add_manual_test(antlr_parser.cpp)
|
|
|
|
target_link_libraries(${test_prefix}antlr_parser antlr_opencypher_parser_lib)
|
2016-12-16 21:05:04 +08:00
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
add_manual_test(antlr_sigsegv.cpp)
|
|
|
|
target_link_libraries(${test_prefix}antlr_sigsegv gtest gtest_main
|
|
|
|
antlr_opencypher_parser_lib mg-utils)
|
2016-12-16 21:05:04 +08:00
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
add_manual_test(antlr_tree_pretty_print.cpp)
|
|
|
|
target_link_libraries(${test_prefix}antlr_tree_pretty_print antlr_opencypher_parser_lib)
|
2016-12-16 21:05:04 +08:00
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
add_manual_test(bolt_client.cpp)
|
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
|
|
|
target_link_libraries(${test_prefix}bolt_client mg-communication)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
2018-06-20 19:46:54 +08:00
|
|
|
add_manual_test(kvstore_console.cpp)
|
2021-01-21 22:47:56 +08:00
|
|
|
target_link_libraries(${test_prefix}kvstore_console mg-kvstore gflags mg-utils)
|
2018-06-20 19:46:54 +08:00
|
|
|
|
2018-05-29 17:13:13 +08:00
|
|
|
add_manual_test(query_hash.cpp)
|
2020-01-14 21:46:41 +08:00
|
|
|
target_link_libraries(${test_prefix}query_hash mg-query)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
2018-10-10 16:23:10 +08:00
|
|
|
add_manual_test(query_planner.cpp interactive_planning.cpp)
|
2020-01-14 21:46:41 +08:00
|
|
|
target_link_libraries(${test_prefix}query_planner mg-query)
|
2019-11-13 22:31:20 +08:00
|
|
|
if (READLINE_FOUND)
|
|
|
|
target_link_libraries(${test_prefix}query_planner readline)
|
|
|
|
endif()
|
2019-01-16 17:43:32 +08:00
|
|
|
|
|
|
|
add_manual_test(expression_pretty_printer.cpp)
|
2020-01-14 21:46:41 +08:00
|
|
|
target_link_libraries(${test_prefix}expression_pretty_printer mg-query)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
2020-01-07 22:06:33 +08:00
|
|
|
add_manual_test(single_query.cpp ${CMAKE_SOURCE_DIR}/src/glue/communication.cpp)
|
2020-01-14 21:46:41 +08:00
|
|
|
target_link_libraries(${test_prefix}single_query mg-query mg-communication)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
|
|
|
add_manual_test(stripped_timing.cpp)
|
2020-01-14 21:46:41 +08:00
|
|
|
target_link_libraries(${test_prefix}stripped_timing mg-query)
|
2018-05-29 17:13:13 +08:00
|
|
|
|
2018-06-20 23:44:47 +08:00
|
|
|
add_manual_test(ssl_client.cpp)
|
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
|
|
|
target_link_libraries(${test_prefix}ssl_client mg-communication)
|
2018-06-20 23:44:47 +08:00
|
|
|
|
|
|
|
add_manual_test(ssl_server.cpp)
|
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
|
|
|
target_link_libraries(${test_prefix}ssl_server mg-communication)
|