MXS-1413: Move cdc_connector into a subdirectory
Moved the cdc_connector into a subdirectory to distinct it from the other test sources.
This commit is contained in:
parent
a6a7249cb5
commit
52da6c0214
@ -45,15 +45,19 @@ else()
|
||||
message(WARNING "Java not found, Java based tests are not run.")
|
||||
endif()
|
||||
|
||||
# Build the CDC connector
|
||||
add_subdirectory(cdc_connector)
|
||||
include_directories(cdc_connector)
|
||||
|
||||
# The core library
|
||||
add_library(testcore SHARED testconnections.cpp mariadb_nodes.cpp
|
||||
mariadb_func.cpp get_com_select_insert.cpp maxadmin_operations.cpp big_transaction.cpp
|
||||
sql_t1.cpp test_binlog_fnc.cpp get_my_ip.cpp big_load.cpp get_com_select_insert.cpp
|
||||
different_size.cpp fw_copy_rules maxinfo_func.cpp config_operations.cpp rds_vpc.cpp execute_cmd.cpp
|
||||
blob_test.cpp cdc_connector.cpp)
|
||||
target_link_libraries(testcore ${MYSQL_CLIENT} z crypt nsl m pthread ssl crypto dl rt jansson)
|
||||
blob_test.cpp)
|
||||
target_link_libraries(testcore ${MYSQL_CLIENT} z crypt nsl m pthread ssl crypto dl rt cdc_connector)
|
||||
install(TARGETS testcore DESTINATION system-test)
|
||||
add_dependencies(testcore connector-c)
|
||||
add_dependencies(testcore connector-c cdc_connector)
|
||||
|
||||
# Tool used to check backend state
|
||||
add_test_executable_notest(check_backend.cpp check_backend check_backend LABELS CONFIG)
|
||||
|
8
maxscale-system-test/cdc_connector/CMakeLists.txt
Normal file
8
maxscale-system-test/cdc_connector/CMakeLists.txt
Normal file
@ -0,0 +1,8 @@
|
||||
include(cmake/BuildJansson.cmake)
|
||||
|
||||
include_directories(${JANSSON_INCLUDE_DIR})
|
||||
add_library(cdc_connector STATIC cdc_connector.cpp)
|
||||
target_link_libraries(cdc_connector ${JANSSON_LIBRARIES})
|
||||
add_dependencies(cdc_connector jansson)
|
||||
install(TARGETS cdc_connector DESTINATION lib)
|
||||
install(FILES cdc_connector.h DESTINATION include)
|
@ -1,4 +1,5 @@
|
||||
#include "cdc_connector.h"
|
||||
|
||||
#include <arpa/inet.h>
|
||||
#include <stdexcept>
|
||||
#include <unistd.h>
|
||||
@ -6,6 +7,7 @@
|
||||
#include <openssl/sha.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/types.h>
|
||||
#include <jansson.h>
|
||||
|
||||
#define CDC_CONNECTOR_VERSION "1.0.0"
|
||||
|
20
maxscale-system-test/cdc_connector/cmake/BuildJansson.cmake
Normal file
20
maxscale-system-test/cdc_connector/cmake/BuildJansson.cmake
Normal file
@ -0,0 +1,20 @@
|
||||
# If the Jansson library is not found, download it and build it from source.
|
||||
|
||||
set(JANSSON_REPO "https://github.com/akheron/jansson.git" CACHE STRING "Jansson Git repository")
|
||||
|
||||
# Release 2.9 of Jansson
|
||||
set(JANSSON_TAG "v2.9" CACHE STRING "Jansson Git tag")
|
||||
|
||||
ExternalProject_Add(jansson
|
||||
GIT_REPOSITORY ${JANSSON_REPO}
|
||||
GIT_TAG ${JANSSON_TAG}
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/jansson/install -DCMAKE_C_FLAGS=-fPIC -DJANSSON_BUILD_DOCS=OFF
|
||||
BINARY_DIR ${CMAKE_BINARY_DIR}/jansson
|
||||
INSTALL_DIR ${CMAKE_BINARY_DIR}/jansson/install
|
||||
UPDATE_COMMAND "")
|
||||
|
||||
set(JANSSON_FOUND TRUE CACHE INTERNAL "")
|
||||
set(JANSSON_STATIC_FOUND TRUE CACHE INTERNAL "")
|
||||
set(JANSSON_INCLUDE_DIR ${CMAKE_BINARY_DIR}/jansson/install/include CACHE INTERNAL "")
|
||||
set(JANSSON_STATIC_LIBRARIES ${CMAKE_BINARY_DIR}/jansson/install/lib/libjansson.a CACHE INTERNAL "")
|
||||
set(JANSSON_LIBRARIES ${JANSSON_STATIC_LIBRARIES} CACHE INTERNAL "")
|
@ -3,7 +3,7 @@
|
||||
*/
|
||||
|
||||
#include "../testconnections.h"
|
||||
#include "../cdc_connector.h"
|
||||
#include <cdc_connector.h>
|
||||
#include "cdc_result.h"
|
||||
#include <iostream>
|
||||
#include <stdio.h>
|
||||
|
Loading…
x
Reference in New Issue
Block a user