system-test works with production version of Maxscale

Every change to MariaDB Enterprise should be tested with Maxscale.
Maxscale should be stable - installed from production repository.
New enviromental variable 'maxscale_product' is introduced.
It can be 'maxscale' or 'maxscale_ci' (default is 'maxscale_ci')
This commit is contained in:
Timofey Turenko 2020-12-23 04:06:35 +02:00
parent 22a112e137
commit 7c68c396a2
6 changed files with 21 additions and 3 deletions

View File

@ -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
*/

View File

@ -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()
@ -2231,6 +2232,7 @@ int TestConnections::process_mdbci_template()
envvar_get_set("backend_box", "%s", box.c_str());
envvar_get_set("target", "develop");
envvar_get_set("vm_memory", "2048");
envvar_get_set("maxscale_product", "maxscale_ci");
string version = envvar_get_set("version", "10.3");
envvar_get_set("galera_version", "%s", version.c_str());

View File

@ -4,5 +4,5 @@ export host=$user@$ip 2>&1 >/dev/null
sshopt="-q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o ConnectTimeout=120 "
rsync -avz --progress -e "ssh $sshopt" ${MDBCI_VM_PATH}/ $host:${MDBCI_VM_PATH}/ 2>&1 >/dev/null
ssh $sshopt $host "MDBCI_VM_PATH=$MDBCI_VM_PATH /home/$user/mdbci/mdbci $*" 2>/dev/null
ssh $sshopt $host "MDBCI_VM_PATH=${MDBCI_VM_PATH} ${MDBCI_EXECUTABLE} $*" 2>/dev/null
rsync -avz --progress -e "ssh $sshopt" $host:${MDBCI_VM_PATH}/ ${MDBCI_VM_PATH}/ 2>&1 >/dev/null

View File

@ -37,6 +37,9 @@
# the value of $test_set after 'NAME#' is used as bash command
# line
# example: '#NAME long_test_time=3600 ./long_test'
#
# $maxscale_product - use CI or production version of Maxscale
# 'maxscale_ci' or 'maxscale'
export vm_memory=${vm_memory:-"2048"}
export dir=`pwd`
@ -53,6 +56,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 maxscale_product=${maxscale_product:-"maxscale_ci"}
mdbci destroy --force ${mdbci_config_name}
@ -61,6 +65,7 @@ mdbci destroy --force ${mdbci_config_name}
ulimit -c unlimited
cd ${script_dir}/../../
rm -rf build
mkdir build && cd build
cmake .. -DBUILD_SYSTEM_TESTS=Y -DBUILDNAME=${mdbci_config_name} -DCMAKE_BUILD_TYPE=Debug
cd system-test

View File

@ -1,5 +1,7 @@
#!/bin/bash
# $HOME/.config/mdbci/max-tst.key file should contain private key to access host
# read the name of build scripts directory
export script_dir="$(dirname $(readlink -f $0))"
@ -10,6 +12,7 @@ export mdbci_config_name=${name:-$box-${curr_date}}
export mdbci_config_name=`echo ${mdbci_config_name} | sed "s/?//g"`
export MDBCI_VM_PATH=$HOME/${mdbci_config_name}_vms
export PATH=$PATH:$HOME/mdbci
export MDBCI_EXECUTABLE=`which mdbci`
. ${script_dir}/set_run_test_variables.sh
@ -57,6 +60,7 @@ test_env_list=(
"JOB_NAME"
"BUILD_NUMBER"
"BUILD_TIMESTAMP"
"MDBCI_EXECUTABLE"
"name"
"target"
"box"
@ -75,6 +79,7 @@ test_env_list=(
"test_branch"
"use_valgrind"
"use_callgrind"
"maxscale_product"
)
for s in ${test_env_list[@]} ; do

View File

@ -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}"
}