MXS-2900 Move testcore library files to a dedicated directory
The library is now named "maxtest". The related include-files are, for now, usable without designating the full include path. This may be changed later, but would require modifying every test.
This commit is contained in:
parent
e180c20055
commit
96ba2da40c
@ -26,23 +26,14 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
include_directories(${CMAKE_SOURCE_DIR}/connectors/cdc-connector)
|
||||
|
||||
# The core library
|
||||
include_directories(${CMAKE_BINARY_DIR})
|
||||
add_library(testcore SHARED testconnections.cpp nodes.cpp mariadb_nodes.cpp maxscales.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 keepalived_func.cpp tcp_connection.cpp base/stopwatch.cpp fw_copy_rules.cpp
|
||||
labels_table.cpp envv.cpp
|
||||
# Include the CDC connector in the core library
|
||||
${CMAKE_SOURCE_DIR}/connectors/cdc-connector/cdc_connector.cpp)
|
||||
target_link_libraries(testcore ${MARIADB_CONNECTOR_LIBRARIES} ${JANSSON_LIBRARIES} z m pthread ssl dl rt crypto crypt maxbase)
|
||||
install(TARGETS testcore DESTINATION system-test)
|
||||
add_dependencies(testcore connector-c jansson maxbase)
|
||||
|
||||
# Include the CDC connector headers
|
||||
include_directories(${CMAKE_SOURCE_DIR}/../connectors/cdc-connector/)
|
||||
|
||||
# The core testing library
|
||||
add_subdirectory(maxtest)
|
||||
include_directories(maxtest/include/maxtest)
|
||||
|
||||
# Tool used to check backend state
|
||||
add_test_executable_notest(check_backend.cpp check_backend check_backend LABELS CONFIG REPL_BACKEND GALERA_BACKEND TWO_MAXSCALES)
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @file cdc_connect.cpp Test the CDC protocol
|
||||
*/
|
||||
|
||||
#include "../testconnections.h"
|
||||
#include "testconnections.h"
|
||||
#include <cdc_connector.h>
|
||||
#include "cdc_result.h"
|
||||
#include <iostream>
|
||||
|
2
maxscale-system-test/maxtest/CMakeLists.txt
Normal file
2
maxscale-system-test/maxtest/CMakeLists.txt
Normal file
@ -0,0 +1,2 @@
|
||||
include_directories(include/maxtest)
|
||||
add_subdirectory(src)
|
31
maxscale-system-test/maxtest/src/CMakeLists.txt
Normal file
31
maxscale-system-test/maxtest/src/CMakeLists.txt
Normal file
@ -0,0 +1,31 @@
|
||||
add_library(maxtest SHARED
|
||||
stopwatch.cpp
|
||||
big_load.cpp
|
||||
big_transaction.cpp
|
||||
blob_test.cpp
|
||||
config_operations.cpp
|
||||
different_size.cpp
|
||||
envv.cpp
|
||||
execute_cmd.cpp
|
||||
fw_copy_rules.cpp
|
||||
get_com_select_insert.cpp
|
||||
get_my_ip.cpp
|
||||
keepalived_func.cpp
|
||||
labels_table.cpp
|
||||
mariadb_func.cpp
|
||||
mariadb_nodes.cpp
|
||||
maxadmin_operations.cpp
|
||||
maxinfo_func.cpp
|
||||
maxscales.cpp
|
||||
nodes.cpp
|
||||
rds_vpc.cpp
|
||||
sql_t1.cpp
|
||||
tcp_connection.cpp
|
||||
test_binlog_fnc.cpp
|
||||
testconnections.cpp
|
||||
# Include the CDC connector in the core library
|
||||
${CMAKE_SOURCE_DIR}/connectors/cdc-connector/cdc_connector.cpp)
|
||||
target_link_libraries(maxtest ${MARIADB_CONNECTOR_LIBRARIES} ${JANSSON_LIBRARIES} z m pthread ssl dl rt crypto crypt maxbase)
|
||||
set_target_properties(maxtest PROPERTIES VERSION "1.0.0" LINK_FLAGS -Wl,-z,defs)
|
||||
install(TARGETS maxtest DESTINATION system-test)
|
||||
add_dependencies(maxtest connector-c jansson maxbase)
|
@ -4,8 +4,8 @@
|
||||
*/
|
||||
|
||||
#include "testconnections.h"
|
||||
#include <base/stopwatch.h>
|
||||
#include <base/appexception.h>
|
||||
#include "stopwatch.h"
|
||||
#include "appexception.h"
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <sstream>
|
||||
|
@ -11,7 +11,7 @@
|
||||
* Public License.
|
||||
*/
|
||||
|
||||
#include "testconnections.h"
|
||||
#include "mariadb_nodes.h"
|
||||
#include "failover_common.cpp"
|
||||
|
||||
int main(int argc, char** argv)
|
||||
|
@ -26,7 +26,7 @@ set(TIMEOUT 3600)
|
||||
function(add_test_executable source name template)
|
||||
add_template(${name} ${template} "${ARGV}")
|
||||
add_executable(${name} ${source})
|
||||
target_link_libraries(${name} testcore)
|
||||
target_link_libraries(${name} maxtest)
|
||||
add_test(NAME ${name} COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${name} ${name} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
list(REMOVE_AT ARGV 0 1 2 3)
|
||||
@ -42,7 +42,7 @@ endfunction()
|
||||
function(add_test_executable_notest source name template)
|
||||
add_template(${name} ${template} "${ARGV}")
|
||||
add_executable(${name} ${source})
|
||||
target_link_libraries(${name} testcore)
|
||||
target_link_libraries(${name} maxtest)
|
||||
endfunction()
|
||||
|
||||
# Add a test which uses another test as the executable
|
||||
|
Loading…
x
Reference in New Issue
Block a user