diff --git a/maxscale-system-test/CMakeLists.txt b/maxscale-system-test/CMakeLists.txt index cce4e3546..dba217eaa 100644 --- a/maxscale-system-test/CMakeLists.txt +++ b/maxscale-system-test/CMakeLists.txt @@ -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) diff --git a/maxscale-system-test/cdc_datatypes/cdc_datatypes.cpp b/maxscale-system-test/cdc_datatypes/cdc_datatypes.cpp index d68e9ee51..47a437144 100644 --- a/maxscale-system-test/cdc_datatypes/cdc_datatypes.cpp +++ b/maxscale-system-test/cdc_datatypes/cdc_datatypes.cpp @@ -2,7 +2,7 @@ * @file cdc_connect.cpp Test the CDC protocol */ -#include "../testconnections.h" +#include "testconnections.h" #include #include "cdc_result.h" #include diff --git a/maxscale-system-test/maxtest/CMakeLists.txt b/maxscale-system-test/maxtest/CMakeLists.txt new file mode 100644 index 000000000..8e1d2119d --- /dev/null +++ b/maxscale-system-test/maxtest/CMakeLists.txt @@ -0,0 +1,2 @@ +include_directories(include/maxtest) +add_subdirectory(src) diff --git a/maxscale-system-test/base/appexception.h b/maxscale-system-test/maxtest/include/maxtest/appexception.h similarity index 100% rename from maxscale-system-test/base/appexception.h rename to maxscale-system-test/maxtest/include/maxtest/appexception.h diff --git a/maxscale-system-test/big_load.h b/maxscale-system-test/maxtest/include/maxtest/big_load.h similarity index 100% rename from maxscale-system-test/big_load.h rename to maxscale-system-test/maxtest/include/maxtest/big_load.h diff --git a/maxscale-system-test/big_transaction.h b/maxscale-system-test/maxtest/include/maxtest/big_transaction.h similarity index 100% rename from maxscale-system-test/big_transaction.h rename to maxscale-system-test/maxtest/include/maxtest/big_transaction.h diff --git a/maxscale-system-test/blob_test.h b/maxscale-system-test/maxtest/include/maxtest/blob_test.h similarity index 100% rename from maxscale-system-test/blob_test.h rename to maxscale-system-test/maxtest/include/maxtest/blob_test.h diff --git a/maxscale-system-test/config_operations.h b/maxscale-system-test/maxtest/include/maxtest/config_operations.h similarity index 100% rename from maxscale-system-test/config_operations.h rename to maxscale-system-test/maxtest/include/maxtest/config_operations.h diff --git a/maxscale-system-test/different_size.h b/maxscale-system-test/maxtest/include/maxtest/different_size.h similarity index 100% rename from maxscale-system-test/different_size.h rename to maxscale-system-test/maxtest/include/maxtest/different_size.h diff --git a/maxscale-system-test/base/env.h b/maxscale-system-test/maxtest/include/maxtest/env.h similarity index 100% rename from maxscale-system-test/base/env.h rename to maxscale-system-test/maxtest/include/maxtest/env.h diff --git a/maxscale-system-test/envv.h b/maxscale-system-test/maxtest/include/maxtest/envv.h similarity index 100% rename from maxscale-system-test/envv.h rename to maxscale-system-test/maxtest/include/maxtest/envv.h diff --git a/maxscale-system-test/execute_cmd.h b/maxscale-system-test/maxtest/include/maxtest/execute_cmd.h similarity index 100% rename from maxscale-system-test/execute_cmd.h rename to maxscale-system-test/maxtest/include/maxtest/execute_cmd.h diff --git a/maxscale-system-test/fw_copy_rules.h b/maxscale-system-test/maxtest/include/maxtest/fw_copy_rules.h similarity index 100% rename from maxscale-system-test/fw_copy_rules.h rename to maxscale-system-test/maxtest/include/maxtest/fw_copy_rules.h diff --git a/maxscale-system-test/get_com_select_insert.h b/maxscale-system-test/maxtest/include/maxtest/get_com_select_insert.h similarity index 100% rename from maxscale-system-test/get_com_select_insert.h rename to maxscale-system-test/maxtest/include/maxtest/get_com_select_insert.h diff --git a/maxscale-system-test/get_my_ip.h b/maxscale-system-test/maxtest/include/maxtest/get_my_ip.h similarity index 100% rename from maxscale-system-test/get_my_ip.h rename to maxscale-system-test/maxtest/include/maxtest/get_my_ip.h diff --git a/maxscale-system-test/keepalived_func.h b/maxscale-system-test/maxtest/include/maxtest/keepalived_func.h similarity index 100% rename from maxscale-system-test/keepalived_func.h rename to maxscale-system-test/maxtest/include/maxtest/keepalived_func.h diff --git a/maxscale-system-test/labels_table.h b/maxscale-system-test/maxtest/include/maxtest/labels_table.h similarity index 100% rename from maxscale-system-test/labels_table.h rename to maxscale-system-test/maxtest/include/maxtest/labels_table.h diff --git a/maxscale-system-test/mariadb_func.h b/maxscale-system-test/maxtest/include/maxtest/mariadb_func.h similarity index 100% rename from maxscale-system-test/mariadb_func.h rename to maxscale-system-test/maxtest/include/maxtest/mariadb_func.h diff --git a/maxscale-system-test/mariadb_nodes.h b/maxscale-system-test/maxtest/include/maxtest/mariadb_nodes.h similarity index 100% rename from maxscale-system-test/mariadb_nodes.h rename to maxscale-system-test/maxtest/include/maxtest/mariadb_nodes.h diff --git a/maxscale-system-test/maxadmin_operations.h b/maxscale-system-test/maxtest/include/maxtest/maxadmin_operations.h similarity index 100% rename from maxscale-system-test/maxadmin_operations.h rename to maxscale-system-test/maxtest/include/maxtest/maxadmin_operations.h diff --git a/maxscale-system-test/maxinfo_func.h b/maxscale-system-test/maxtest/include/maxtest/maxinfo_func.h similarity index 100% rename from maxscale-system-test/maxinfo_func.h rename to maxscale-system-test/maxtest/include/maxtest/maxinfo_func.h diff --git a/maxscale-system-test/maxscales.h b/maxscale-system-test/maxtest/include/maxtest/maxscales.h similarity index 100% rename from maxscale-system-test/maxscales.h rename to maxscale-system-test/maxtest/include/maxtest/maxscales.h diff --git a/maxscale-system-test/nodes.h b/maxscale-system-test/maxtest/include/maxtest/nodes.h similarity index 100% rename from maxscale-system-test/nodes.h rename to maxscale-system-test/maxtest/include/maxtest/nodes.h diff --git a/maxscale-system-test/rds_vpc.h b/maxscale-system-test/maxtest/include/maxtest/rds_vpc.h similarity index 100% rename from maxscale-system-test/rds_vpc.h rename to maxscale-system-test/maxtest/include/maxtest/rds_vpc.h diff --git a/maxscale-system-test/sql_const.h b/maxscale-system-test/maxtest/include/maxtest/sql_const.h similarity index 100% rename from maxscale-system-test/sql_const.h rename to maxscale-system-test/maxtest/include/maxtest/sql_const.h diff --git a/maxscale-system-test/sql_t1.h b/maxscale-system-test/maxtest/include/maxtest/sql_t1.h similarity index 100% rename from maxscale-system-test/sql_t1.h rename to maxscale-system-test/maxtest/include/maxtest/sql_t1.h diff --git a/maxscale-system-test/base/stopwatch.h b/maxscale-system-test/maxtest/include/maxtest/stopwatch.h similarity index 100% rename from maxscale-system-test/base/stopwatch.h rename to maxscale-system-test/maxtest/include/maxtest/stopwatch.h diff --git a/maxscale-system-test/tcp_connection.h b/maxscale-system-test/maxtest/include/maxtest/tcp_connection.h similarity index 100% rename from maxscale-system-test/tcp_connection.h rename to maxscale-system-test/maxtest/include/maxtest/tcp_connection.h diff --git a/maxscale-system-test/test_binlog_fnc.h b/maxscale-system-test/maxtest/include/maxtest/test_binlog_fnc.h similarity index 100% rename from maxscale-system-test/test_binlog_fnc.h rename to maxscale-system-test/maxtest/include/maxtest/test_binlog_fnc.h diff --git a/maxscale-system-test/testconnections.h b/maxscale-system-test/maxtest/include/maxtest/testconnections.h similarity index 100% rename from maxscale-system-test/testconnections.h rename to maxscale-system-test/maxtest/include/maxtest/testconnections.h diff --git a/maxscale-system-test/maxtest/src/CMakeLists.txt b/maxscale-system-test/maxtest/src/CMakeLists.txt new file mode 100644 index 000000000..e70b30026 --- /dev/null +++ b/maxscale-system-test/maxtest/src/CMakeLists.txt @@ -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) diff --git a/maxscale-system-test/big_load.cpp b/maxscale-system-test/maxtest/src/big_load.cpp similarity index 100% rename from maxscale-system-test/big_load.cpp rename to maxscale-system-test/maxtest/src/big_load.cpp diff --git a/maxscale-system-test/big_transaction.cpp b/maxscale-system-test/maxtest/src/big_transaction.cpp similarity index 100% rename from maxscale-system-test/big_transaction.cpp rename to maxscale-system-test/maxtest/src/big_transaction.cpp diff --git a/maxscale-system-test/blob_test.cpp b/maxscale-system-test/maxtest/src/blob_test.cpp similarity index 100% rename from maxscale-system-test/blob_test.cpp rename to maxscale-system-test/maxtest/src/blob_test.cpp diff --git a/maxscale-system-test/config_operations.cpp b/maxscale-system-test/maxtest/src/config_operations.cpp similarity index 100% rename from maxscale-system-test/config_operations.cpp rename to maxscale-system-test/maxtest/src/config_operations.cpp diff --git a/maxscale-system-test/different_size.cpp b/maxscale-system-test/maxtest/src/different_size.cpp similarity index 100% rename from maxscale-system-test/different_size.cpp rename to maxscale-system-test/maxtest/src/different_size.cpp diff --git a/maxscale-system-test/envv.cpp b/maxscale-system-test/maxtest/src/envv.cpp similarity index 100% rename from maxscale-system-test/envv.cpp rename to maxscale-system-test/maxtest/src/envv.cpp diff --git a/maxscale-system-test/execute_cmd.cpp b/maxscale-system-test/maxtest/src/execute_cmd.cpp similarity index 100% rename from maxscale-system-test/execute_cmd.cpp rename to maxscale-system-test/maxtest/src/execute_cmd.cpp diff --git a/maxscale-system-test/fw_copy_rules.cpp b/maxscale-system-test/maxtest/src/fw_copy_rules.cpp similarity index 100% rename from maxscale-system-test/fw_copy_rules.cpp rename to maxscale-system-test/maxtest/src/fw_copy_rules.cpp diff --git a/maxscale-system-test/get_com_select_insert.cpp b/maxscale-system-test/maxtest/src/get_com_select_insert.cpp similarity index 100% rename from maxscale-system-test/get_com_select_insert.cpp rename to maxscale-system-test/maxtest/src/get_com_select_insert.cpp diff --git a/maxscale-system-test/get_my_ip.cpp b/maxscale-system-test/maxtest/src/get_my_ip.cpp similarity index 100% rename from maxscale-system-test/get_my_ip.cpp rename to maxscale-system-test/maxtest/src/get_my_ip.cpp diff --git a/maxscale-system-test/keepalived_func.cpp b/maxscale-system-test/maxtest/src/keepalived_func.cpp similarity index 100% rename from maxscale-system-test/keepalived_func.cpp rename to maxscale-system-test/maxtest/src/keepalived_func.cpp diff --git a/maxscale-system-test/labels_table.cpp b/maxscale-system-test/maxtest/src/labels_table.cpp similarity index 100% rename from maxscale-system-test/labels_table.cpp rename to maxscale-system-test/maxtest/src/labels_table.cpp diff --git a/maxscale-system-test/mariadb_func.cpp b/maxscale-system-test/maxtest/src/mariadb_func.cpp similarity index 100% rename from maxscale-system-test/mariadb_func.cpp rename to maxscale-system-test/maxtest/src/mariadb_func.cpp diff --git a/maxscale-system-test/mariadb_nodes.cpp b/maxscale-system-test/maxtest/src/mariadb_nodes.cpp similarity index 100% rename from maxscale-system-test/mariadb_nodes.cpp rename to maxscale-system-test/maxtest/src/mariadb_nodes.cpp diff --git a/maxscale-system-test/maxadmin_operations.cpp b/maxscale-system-test/maxtest/src/maxadmin_operations.cpp similarity index 100% rename from maxscale-system-test/maxadmin_operations.cpp rename to maxscale-system-test/maxtest/src/maxadmin_operations.cpp diff --git a/maxscale-system-test/maxinfo_func.cpp b/maxscale-system-test/maxtest/src/maxinfo_func.cpp similarity index 100% rename from maxscale-system-test/maxinfo_func.cpp rename to maxscale-system-test/maxtest/src/maxinfo_func.cpp diff --git a/maxscale-system-test/maxscales.cpp b/maxscale-system-test/maxtest/src/maxscales.cpp similarity index 100% rename from maxscale-system-test/maxscales.cpp rename to maxscale-system-test/maxtest/src/maxscales.cpp diff --git a/maxscale-system-test/nodes.cpp b/maxscale-system-test/maxtest/src/nodes.cpp similarity index 100% rename from maxscale-system-test/nodes.cpp rename to maxscale-system-test/maxtest/src/nodes.cpp diff --git a/maxscale-system-test/rds_vpc.cpp b/maxscale-system-test/maxtest/src/rds_vpc.cpp similarity index 100% rename from maxscale-system-test/rds_vpc.cpp rename to maxscale-system-test/maxtest/src/rds_vpc.cpp diff --git a/maxscale-system-test/sql_t1.cpp b/maxscale-system-test/maxtest/src/sql_t1.cpp similarity index 100% rename from maxscale-system-test/sql_t1.cpp rename to maxscale-system-test/maxtest/src/sql_t1.cpp diff --git a/maxscale-system-test/base/stopwatch.cpp b/maxscale-system-test/maxtest/src/stopwatch.cpp similarity index 100% rename from maxscale-system-test/base/stopwatch.cpp rename to maxscale-system-test/maxtest/src/stopwatch.cpp diff --git a/maxscale-system-test/tcp_connection.cpp b/maxscale-system-test/maxtest/src/tcp_connection.cpp similarity index 100% rename from maxscale-system-test/tcp_connection.cpp rename to maxscale-system-test/maxtest/src/tcp_connection.cpp diff --git a/maxscale-system-test/test_binlog_fnc.cpp b/maxscale-system-test/maxtest/src/test_binlog_fnc.cpp similarity index 100% rename from maxscale-system-test/test_binlog_fnc.cpp rename to maxscale-system-test/maxtest/src/test_binlog_fnc.cpp diff --git a/maxscale-system-test/testconnections.cpp b/maxscale-system-test/maxtest/src/testconnections.cpp similarity index 100% rename from maxscale-system-test/testconnections.cpp rename to maxscale-system-test/maxtest/src/testconnections.cpp diff --git a/maxscale-system-test/mxs173_throttle_filter.cpp b/maxscale-system-test/mxs173_throttle_filter.cpp index 7e0590b7a..fbc7c36d6 100644 --- a/maxscale-system-test/mxs173_throttle_filter.cpp +++ b/maxscale-system-test/mxs173_throttle_filter.cpp @@ -4,8 +4,8 @@ */ #include "testconnections.h" -#include -#include +#include "stopwatch.h" +#include "appexception.h" #include #include #include diff --git a/maxscale-system-test/mysqlmon_failover_auto.cpp b/maxscale-system-test/mysqlmon_failover_auto.cpp index 4689f7fdc..49ebc1a49 100644 --- a/maxscale-system-test/mysqlmon_failover_auto.cpp +++ b/maxscale-system-test/mysqlmon_failover_auto.cpp @@ -11,7 +11,7 @@ * Public License. */ -#include "testconnections.h" +#include "mariadb_nodes.h" #include "failover_common.cpp" int main(int argc, char** argv) diff --git a/maxscale-system-test/utilities.cmake b/maxscale-system-test/utilities.cmake index 48a8e3fe0..87be4445a 100644 --- a/maxscale-system-test/utilities.cmake +++ b/maxscale-system-test/utilities.cmake @@ -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