1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-15409 make sure every sst script is tested in buildbot

* make galera.galera_sst_xtrabackup* not big
* auto-select between socat and nc, whatever available
* auto-skip xtrabackup tests if no xtrabackup or neither socat nor nc
This commit is contained in:
Sergei Golubchik
2018-03-20 13:51:55 +01:00
parent 4b1cbff7a8
commit 60d4abc1e5
10 changed files with 31 additions and 4 deletions

View File

@@ -0,0 +1,4 @@
#
# suite.pm will make sure that all tests including this file
# will be skipped as needed
#

View File

@@ -1,4 +1,4 @@
package My::Suite::GALERA; package My::Suite::Galera;
use File::Basename; use File::Basename;
use My::Find; use My::Find;
@@ -25,6 +25,8 @@ return "No scritps" unless $cpath;
my ($epath) = grep { -f "$_/my_print_defaults"; } "$::bindir/extra", $::path_client_bindir; my ($epath) = grep { -f "$_/my_print_defaults"; } "$::bindir/extra", $::path_client_bindir;
return "No my_print_defaults" unless $epath; return "No my_print_defaults" unless $epath;
sub which($) { return `sh -c "command -v $_[0]"` }
push @::global_suppressions, push @::global_suppressions,
( (
qr(WSREP: wsrep_sst_receive_address is set to '127.0.0.1), qr(WSREP: wsrep_sst_receive_address is set to '127.0.0.1),
@@ -82,5 +84,19 @@ $ENV{PATH}="$epath:$ENV{PATH}";
$ENV{PATH}="$spath:$ENV{PATH}" unless $epath eq $spath; $ENV{PATH}="$spath:$ENV{PATH}" unless $epath eq $spath;
$ENV{PATH}="$cpath:$ENV{PATH}" unless $cpath eq $spath; $ENV{PATH}="$cpath:$ENV{PATH}" unless $cpath eq $spath;
bless { }; if (which(socat)) {
$ENV{MTR_GALERA_TFMT}='socat';
} elsif (which(nc)) {
$ENV{MTR_GALERA_TFMT}='nc';
}
sub skip_combinations {
my %skip = ();
$skip{'include/have_xtrabackup.inc'} = 'Need innobackupex'
unless which(innobackupex);
$skip{'include/have_xtrabackup.inc'} = 'Need socat or nc'
unless $ENV{MTR_GALERA_TFMT};
%skip;
}
bless { };

View File

@@ -6,6 +6,7 @@
--source include/big_test.inc --source include/big_test.inc
--source include/galera_cluster.inc --source include/galera_cluster.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/have_xtrabackup.inc
--connection node_1 --connection node_1
--let $connection_id = `SELECT CONNECTION_ID()` --let $connection_id = `SELECT CONNECTION_ID()`

View File

@@ -1,6 +1,7 @@
--source include/big_test.inc --source include/big_test.inc
--source include/galera_cluster.inc --source include/galera_cluster.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/have_xtrabackup.inc
--source suite/galera/include/galera_st_disconnect_slave.inc --source suite/galera/include/galera_st_disconnect_slave.inc
--source suite/galera/include/galera_st_shutdown_slave.inc --source suite/galera/include/galera_st_shutdown_slave.inc

View File

@@ -22,3 +22,4 @@ parallel=2
encrypt=1 encrypt=1
encrypt-algo=AES256 encrypt-algo=AES256
encrypt-key=4FA92C5873672E20FB163A0BCB2BB4A4 encrypt-key=4FA92C5873672E20FB163A0BCB2BB4A4
transferfmt=@ENV.MTR_GALERA_TFMT

View File

@@ -3,9 +3,9 @@
# Initial SST happens via xtrabackup, so there is not much to do in the body of the test # Initial SST happens via xtrabackup, so there is not much to do in the body of the test
# #
--source include/big_test.inc
--source include/galera_cluster.inc --source include/galera_cluster.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/have_xtrabackup.inc
SELECT 1; SELECT 1;

View File

@@ -11,3 +11,5 @@ wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore
[mysqld.2] [mysqld.2]
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=1;pc.ignore_sb=true' wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=1;pc.ignore_sb=true'
[sst]
transferfmt=@ENV.MTR_GALERA_TFMT

View File

@@ -1,6 +1,6 @@
--source include/big_test.inc
--source include/galera_cluster.inc --source include/galera_cluster.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/have_xtrabackup.inc
# Save original auto_increment_offset values. # Save original auto_increment_offset values.
--let $node_1=node_1 --let $node_1=node_1

View File

@@ -9,3 +9,4 @@ wsrep_debug=ON
tkey=@ENV.MYSQL_TEST_DIR/std_data/galera-key.pem tkey=@ENV.MYSQL_TEST_DIR/std_data/galera-key.pem
tcert=@ENV.MYSQL_TEST_DIR/std_data/galera-cert.pem tcert=@ENV.MYSQL_TEST_DIR/std_data/galera-cert.pem
encrypt=3 encrypt=3
transferfmt=@ENV.MTR_GALERA_TFMT

View File

@@ -6,6 +6,7 @@
--source include/big_test.inc --source include/big_test.inc
--source include/galera_cluster.inc --source include/galera_cluster.inc
--source include/have_innodb.inc --source include/have_innodb.inc
--source include/have_xtrabackup.inc
SELECT 1; SELECT 1;