Commit baed6632 authored by mkaruza's avatar mkaruza Committed by Jan Lindström

Fix for galera_3nodes.galera_garbd

Check for garbd executable on different paths. If not found terminate test.
parent 76442927
......@@ -29,9 +29,33 @@
--source include/wait_condition.inc
--echo Starting garbd ...
--let $gp1 = `SELECT SUBSTR(@@wsrep_provider_options, LOCATE('base_port =', @@wsrep_provider_options) + LENGTH('base_port = '))`
--let $galera_port_1 = `SELECT SUBSTR('$gp1', 1, LOCATE(';', '$gp1') - 1)`
--exec `dirname $WSREP_PROVIDER`/../../bin/garb/garbd --address "gcomm://127.0.0.1:$galera_port_1" --group my_wsrep_cluster --options 'base_port=$galera_port_3' > $MYSQL_TMP_DIR/garbd.log 2>&1 &
--perl
use strict;
use File::Basename;
my $provider_dirname = dirname($ENV{WSREP_PROVIDER});
# Array of possible garbd executable paths to be checked
# base is $provider_dirname
my @garbd_executable_search = (
# WSREP_PROVIDER is set in galera repository
${provider_dirname}."/garb/garbd",
# MariaDB (PR #1147)
${provider_dirname}."/../../bin/garb/garbd"
);
my $garbd_executable = '';
foreach my $garbd (@garbd_executable_search) {
if (-f $garbd) {
$garbd_executable= $garbd;
}
}
if ($garbd_executable eq '') {
die("Didn't locate garbd\n");
}
die unless open(FILE, ">$ENV{MYSQLTEST_VARDIR}/tmp/garbd.inc");
print FILE "--exec $garbd_executable --address \"gcomm://127.0.0.1:\$NODE_GALERAPORT_1\" --group my_wsrep_cluster --options 'base_port=\$NODE_GALERAPORT_3' > \$MYSQL_TMP_DIR/garbd.log 2>&1 &\n";
close(FILE);
EOF
--source $MYSQLTEST_VARDIR/tmp/garbd.inc
--remove_file $MYSQLTEST_VARDIR/tmp/garbd.inc
--sleep 5
......
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