summaryrefslogtreecommitdiff
path: root/mysql-test/suite/galera/suite.pm
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-03-20 13:51:55 +0100
committerSergei Golubchik <serg@mariadb.org>2018-03-23 00:55:20 +0100
commit60d4abc1e506e44708b024c34a3145b648841e69 (patch)
treeec912a591eb59d46c6acbd93e679209f4198d507 /mysql-test/suite/galera/suite.pm
parent4b1cbff7a827f3f1cf87122a27770a12bcadf281 (diff)
downloadmariadb-git-60d4abc1e506e44708b024c34a3145b648841e69.tar.gz
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
Diffstat (limited to 'mysql-test/suite/galera/suite.pm')
-rw-r--r--mysql-test/suite/galera/suite.pm20
1 files changed, 18 insertions, 2 deletions
diff --git a/mysql-test/suite/galera/suite.pm b/mysql-test/suite/galera/suite.pm
index 361743f1243..b7d157186d8 100644
--- a/mysql-test/suite/galera/suite.pm
+++ b/mysql-test/suite/galera/suite.pm
@@ -1,4 +1,4 @@
-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 { };