diff --git a/BUILD/mdbci/copy_repos.sh b/BUILD/mdbci/copy_repos.sh index 60063fe1c..71c3483ec 100755 --- a/BUILD/mdbci/copy_repos.sh +++ b/BUILD/mdbci/copy_repos.sh @@ -8,7 +8,10 @@ if [ "$box_type" == "RPM" ] ; then # Build can be executed to check if it is possible to build # and to run install and upgrade tests # with thre real RHEL, but we use CentOS packages for production - if [ "$platform" != "rhel" ] ; then + if [[ "$platform" != "rhel" || ( "$platform" == "rhel" && "$platform_version" == "8" ) ]]; then + if [[ "$platform" == "rhel" && "$platform_version" == "8" ]]; then + export platform="centos" + fi export arch=`ssh $sshopt "arch"` . ${script_dir}/generate_build_info_path.sh diff --git a/maxscale-system-test/maxadmin_operations.h b/maxscale-system-test/maxadmin_operations.h index 80aac2c66..d1e6e36c9 100644 --- a/maxscale-system-test/maxadmin_operations.h +++ b/maxscale-system-test/maxadmin_operations.h @@ -18,8 +18,6 @@ #include #include -// #include - /** * @brief Connect to the MaxScale server diff --git a/maxscale-system-test/mxs585.py b/maxscale-system-test/mxs585.py index 49b1d094f..772a0b209 100755 --- a/maxscale-system-test/mxs585.py +++ b/maxscale-system-test/mxs585.py @@ -6,7 +6,7 @@ import maxpython -test1 = maxpython.MaxScaleTest("mxs585.py") +test1 = maxpython.MaxScaleTest("mxs585.py1") for i in range(0,100): if i % 10 == 0: diff --git a/maxscale-system-test/nodes.cpp b/maxscale-system-test/nodes.cpp index 412fcafee..1cbc596a0 100644 --- a/maxscale-system-test/nodes.cpp +++ b/maxscale-system-test/nodes.cpp @@ -50,9 +50,7 @@ void Nodes::generate_ssh_cmd(char* cmd, int node, const char* ssh, bool sudo) } else { - sprintf(cmd, - "%s", - ssh); + sprintf(cmd, "%s", ssh); } } else diff --git a/maxscale-system-test/testconnections.cpp b/maxscale-system-test/testconnections.cpp index b733d6fbd..78a6925bd 100644 --- a/maxscale-system-test/testconnections.cpp +++ b/maxscale-system-test/testconnections.cpp @@ -258,10 +258,13 @@ TestConnections::TestConnections(int argc, char* argv[]) } } - test_name = basename(argv[0]); - if (!strcmp(test_name, "non_native_setup")) + if (optind < argc) { - test_name = argv[1]; + test_name = argv[optind]; + } + else + { + test_name = basename(argv[0]); } const char * labels_string = NULL; @@ -409,6 +412,24 @@ TestConnections::TestConnections(int argc, char* argv[]) } } + if ((maxscale::restart_galera) && (galera)) + { + galera->stop_nodes(); + galera->start_replication(); + } + + if (maxscale::check_nodes) + { + if (repl && !repl->fix_replication()) + { + exit(BROKEN_VM_FAUILT); + } + if (galera && !galera->fix_replication()) + { + exit(BROKEN_VM_FAUILT); + } + } + if (repl && maxscale::required_repl_version.length()) { int ver_repl_required = get_int_version(maxscale::required_repl_version); @@ -439,24 +460,6 @@ TestConnections::TestConnections(int argc, char* argv[]) } } - if ((maxscale::restart_galera) && (galera)) - { - galera->stop_nodes(); - galera->start_replication(); - } - - if (maxscale::check_nodes) - { - if (repl && !repl->fix_replication()) - { - exit(BROKEN_VM_FAUILT); - } - if (galera && !galera->fix_replication()) - { - exit(BROKEN_VM_FAUILT); - } - } - if (maxscale_init) { init_maxscales(); @@ -601,7 +604,8 @@ void TestConnections::read_mdbci_info() target = readenv("target", "develop"); mdbci_config_name = readenv("mdbci_config_name", "local"); - vm_path = std::string(mdbci_vm_path) + std::string(mdbci_config_name); + vm_path = std::string(mdbci_vm_path) + "/" + std::string(mdbci_config_name); + if (mdbci_config_name != NULL) { std::ifstream nc_file; @@ -2187,6 +2191,13 @@ int TestConnections::call_mdbci(const char * options) tprintf("MDBCI failed to bring up virtual machines"); return 1; } + + std::string team_keys = readenv("team_keys", "~/.ssh/id_rsa.pub"); + system((std::string("mdbci public_keys --key ") + + team_keys + + std::string(" ") + + std::string(mdbci_config_name)).c_str() ); + read_env(); if (repl) {