From 5ef953fb4a8b45619b969cf8fff857fee287f886 Mon Sep 17 00:00:00 2001 From: Timofey Turenko Date: Mon, 21 Dec 2020 11:50:45 +0200 Subject: [PATCH] add comment --- system-test/maxtest/include/maxtest/testconnections.h | 6 ++++++ system-test/maxtest/src/testconnections.cc | 4 ++++ system-test/mdbci/run_test.sh | 1 + system-test/mdbci/run_test_vm.sh | 1 + system-test/mdbci/templates/default.json.template | 4 ++-- 5 files changed, 14 insertions(+), 2 deletions(-) diff --git a/system-test/maxtest/include/maxtest/testconnections.h b/system-test/maxtest/include/maxtest/testconnections.h index 5b71a073c..ad27681d8 100644 --- a/system-test/maxtest/include/maxtest/testconnections.h +++ b/system-test/maxtest/include/maxtest/testconnections.h @@ -144,6 +144,12 @@ public: */ bool binlog_slave_gtid {false}; + /** + * @brief maxscale_product 'maxscale' - use production version of Maxscale, + * 'maxscale_ci' - CI + */ + char * maxscale_product; + /** * @brief timeout seconds until test termination */ diff --git a/system-test/maxtest/src/testconnections.cc b/system-test/maxtest/src/testconnections.cc index 6a2d7fe5a..d3a90c15d 100644 --- a/system-test/maxtest/src/testconnections.cc +++ b/system-test/maxtest/src/testconnections.cc @@ -664,6 +664,7 @@ void TestConnections::read_env() "revert_snapshot_command", "mdbci snapshot revert --path-to-nodes %s --snapshot-name ", m_mdbci_config_name.c_str()); no_vm_revert = readenv_bool("no_vm_revert", true); + maxscale_product = readenv("maxscale_product", "maxscale_ci"); } void TestConnections::print_env() @@ -808,6 +809,9 @@ void TestConnections::process_template(int m, const string& cnf_template_path, c sprintf(str, "sed -i \"s|###access_homedir###|%s|g\" maxscale.cnf", maxscales->access_homedir[m]); system(str); + sprintf(str, "sed -i \"s|###maxscale_product###|%s|g\" maxscale.cnf", maxscale_product); + system(str); + if (repl && repl->v51) { system("sed -i \"s/###repl51###/mysql51_replication=true/g\" maxscale.cnf"); diff --git a/system-test/mdbci/run_test.sh b/system-test/mdbci/run_test.sh index d750d82df..b19d97332 100755 --- a/system-test/mdbci/run_test.sh +++ b/system-test/mdbci/run_test.sh @@ -53,6 +53,7 @@ export mdbci_config_name=`echo ${mdbci_config_name} | sed "s/?//g"` export provider=`mdbci show provider $box --silent 2> /dev/null` export backend_box=${backend_box:-"centos_7_"$provider} +export backend_box=${maxscale_product:-"maxscale_ci"} mdbci destroy --force ${mdbci_config_name} diff --git a/system-test/mdbci/run_test_vm.sh b/system-test/mdbci/run_test_vm.sh index 657ca8b09..e1bcabdba 100755 --- a/system-test/mdbci/run_test_vm.sh +++ b/system-test/mdbci/run_test_vm.sh @@ -75,6 +75,7 @@ test_env_list=( "test_branch" "use_valgrind" "use_callgrind" + "maxscale_product" ) for s in ${test_env_list[@]} ; do diff --git a/system-test/mdbci/templates/default.json.template b/system-test/mdbci/templates/default.json.template index d0af854e6..87ce7bc0d 100644 --- a/system-test/mdbci/templates/default.json.template +++ b/system-test/mdbci/templates/default.json.template @@ -354,7 +354,7 @@ "MAXSCALE" ], "product" : { - "name" : "maxscale_ci", + "name" : "###maxscale_product###", "version" : "${target}" } @@ -370,7 +370,7 @@ "SECOND_MAXSCALE" ], "product" : { - "name" : "maxscale_ci", + "name" : "###maxscale_product###", "version" : "${target}" }