Commit 60d4abc1 authored by Sergei Golubchik's avatar Sergei Golubchik

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
parent 4b1cbff7
#
# suite.pm will make sure that all tests including this file
# will be skipped as needed
#
package My::Suite::GALERA;
package My::Suite::Galera;
use File::Basename;
use My::Find;
......@@ -25,6 +25,8 @@ return "No scritps" unless $cpath;
my ($epath) = grep { -f "$_/my_print_defaults"; } "$::bindir/extra", $::path_client_bindir;
return "No my_print_defaults" unless $epath;
sub which($) { return `sh -c "command -v $_[0]"` }
push @::global_suppressions,
(
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}="$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 { };
......@@ -6,6 +6,7 @@
--source include/big_test.inc
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_xtrabackup.inc
--connection node_1
--let $connection_id = `SELECT CONNECTION_ID()`
......
--source include/big_test.inc
--source include/galera_cluster.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_shutdown_slave.inc
......
......@@ -22,3 +22,4 @@ parallel=2
encrypt=1
encrypt-algo=AES256
encrypt-key=4FA92C5873672E20FB163A0BCB2BB4A4
transferfmt=@ENV.MTR_GALERA_TFMT
......@@ -3,9 +3,9 @@
# 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/have_innodb.inc
--source include/have_xtrabackup.inc
SELECT 1;
......
......@@ -11,3 +11,5 @@ wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore
[mysqld.2]
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=1;pc.ignore_sb=true'
[sst]
transferfmt=@ENV.MTR_GALERA_TFMT
--source include/big_test.inc
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_xtrabackup.inc
# Save original auto_increment_offset values.
--let $node_1=node_1
......
......@@ -9,3 +9,4 @@ wsrep_debug=ON
tkey=@ENV.MYSQL_TEST_DIR/std_data/galera-key.pem
tcert=@ENV.MYSQL_TEST_DIR/std_data/galera-cert.pem
encrypt=3
transferfmt=@ENV.MTR_GALERA_TFMT
......@@ -6,6 +6,7 @@
--source include/big_test.inc
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/have_xtrabackup.inc
SELECT 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment