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:
@ -144,6 +144,12 @@ public:
|
|||||||
*/
|
*/
|
||||||
bool binlog_slave_gtid {false};
|
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
|
* @brief timeout seconds until test termination
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -664,6 +664,7 @@ void TestConnections::read_env()
|
|||||||
"revert_snapshot_command", "mdbci snapshot revert --path-to-nodes %s --snapshot-name ",
|
"revert_snapshot_command", "mdbci snapshot revert --path-to-nodes %s --snapshot-name ",
|
||||||
m_mdbci_config_name.c_str());
|
m_mdbci_config_name.c_str());
|
||||||
no_vm_revert = readenv_bool("no_vm_revert", true);
|
no_vm_revert = readenv_bool("no_vm_revert", true);
|
||||||
|
maxscale_product = readenv("maxscale_product", "maxscale_ci");
|
||||||
}
|
}
|
||||||
|
|
||||||
void TestConnections::print_env()
|
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("backend_box", "%s", box.c_str());
|
||||||
envvar_get_set("target", "develop");
|
envvar_get_set("target", "develop");
|
||||||
envvar_get_set("vm_memory", "2048");
|
envvar_get_set("vm_memory", "2048");
|
||||||
|
envvar_get_set("maxscale_product", "maxscale_ci");
|
||||||
|
|
||||||
string version = envvar_get_set("version", "10.3");
|
string version = envvar_get_set("version", "10.3");
|
||||||
envvar_get_set("galera_version", "%s", version.c_str());
|
envvar_get_set("galera_version", "%s", version.c_str());
|
||||||
|
|||||||
@ -4,5 +4,5 @@ export host=$user@$ip 2>&1 >/dev/null
|
|||||||
sshopt="-q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o ConnectTimeout=120 "
|
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
|
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
|
rsync -avz --progress -e "ssh $sshopt" $host:${MDBCI_VM_PATH}/ ${MDBCI_VM_PATH}/ 2>&1 >/dev/null
|
||||||
|
|||||||
@ -37,6 +37,9 @@
|
|||||||
# the value of $test_set after 'NAME#' is used as bash command
|
# the value of $test_set after 'NAME#' is used as bash command
|
||||||
# line
|
# line
|
||||||
# example: '#NAME long_test_time=3600 ./long_test'
|
# 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 vm_memory=${vm_memory:-"2048"}
|
||||||
export dir=`pwd`
|
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 provider=`mdbci show provider $box --silent 2> /dev/null`
|
||||||
export backend_box=${backend_box:-"centos_7_"$provider}
|
export backend_box=${backend_box:-"centos_7_"$provider}
|
||||||
|
export maxscale_product=${maxscale_product:-"maxscale_ci"}
|
||||||
|
|
||||||
mdbci destroy --force ${mdbci_config_name}
|
mdbci destroy --force ${mdbci_config_name}
|
||||||
|
|
||||||
@ -61,6 +65,7 @@ mdbci destroy --force ${mdbci_config_name}
|
|||||||
ulimit -c unlimited
|
ulimit -c unlimited
|
||||||
|
|
||||||
cd ${script_dir}/../../
|
cd ${script_dir}/../../
|
||||||
|
rm -rf build
|
||||||
mkdir build && cd build
|
mkdir build && cd build
|
||||||
cmake .. -DBUILD_SYSTEM_TESTS=Y -DBUILDNAME=${mdbci_config_name} -DCMAKE_BUILD_TYPE=Debug
|
cmake .. -DBUILD_SYSTEM_TESTS=Y -DBUILDNAME=${mdbci_config_name} -DCMAKE_BUILD_TYPE=Debug
|
||||||
cd system-test
|
cd system-test
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# $HOME/.config/mdbci/max-tst.key file should contain private key to access host
|
||||||
|
|
||||||
# read the name of build scripts directory
|
# read the name of build scripts directory
|
||||||
export script_dir="$(dirname $(readlink -f $0))"
|
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_config_name=`echo ${mdbci_config_name} | sed "s/?//g"`
|
||||||
export MDBCI_VM_PATH=$HOME/${mdbci_config_name}_vms
|
export MDBCI_VM_PATH=$HOME/${mdbci_config_name}_vms
|
||||||
export PATH=$PATH:$HOME/mdbci
|
export PATH=$PATH:$HOME/mdbci
|
||||||
|
export MDBCI_EXECUTABLE=`which mdbci`
|
||||||
|
|
||||||
. ${script_dir}/set_run_test_variables.sh
|
. ${script_dir}/set_run_test_variables.sh
|
||||||
|
|
||||||
@ -57,6 +60,7 @@ test_env_list=(
|
|||||||
"JOB_NAME"
|
"JOB_NAME"
|
||||||
"BUILD_NUMBER"
|
"BUILD_NUMBER"
|
||||||
"BUILD_TIMESTAMP"
|
"BUILD_TIMESTAMP"
|
||||||
|
"MDBCI_EXECUTABLE"
|
||||||
"name"
|
"name"
|
||||||
"target"
|
"target"
|
||||||
"box"
|
"box"
|
||||||
@ -75,6 +79,7 @@ test_env_list=(
|
|||||||
"test_branch"
|
"test_branch"
|
||||||
"use_valgrind"
|
"use_valgrind"
|
||||||
"use_callgrind"
|
"use_callgrind"
|
||||||
|
"maxscale_product"
|
||||||
)
|
)
|
||||||
|
|
||||||
for s in ${test_env_list[@]} ; do
|
for s in ${test_env_list[@]} ; do
|
||||||
|
|||||||
@ -354,7 +354,7 @@
|
|||||||
"MAXSCALE"
|
"MAXSCALE"
|
||||||
],
|
],
|
||||||
"product" : {
|
"product" : {
|
||||||
"name" : "maxscale_ci",
|
"name" : "${maxscale_product}",
|
||||||
"version" : "${target}"
|
"version" : "${target}"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -370,7 +370,7 @@
|
|||||||
"SECOND_MAXSCALE"
|
"SECOND_MAXSCALE"
|
||||||
],
|
],
|
||||||
"product" : {
|
"product" : {
|
||||||
"name" : "maxscale_ci",
|
"name" : "${maxscale_product}",
|
||||||
"version" : "${target}"
|
"version" : "${target}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user