diff options
author | Julius Goryavsky <julius.goryavsky@mariadb.com> | 2019-07-09 16:54:08 +0200 |
---|---|---|
committer | Julius Goryavsky <julius.goryavsky@mariadb.com> | 2019-07-15 17:26:53 +0200 |
commit | aa96e56c55c44d2c20c1cd70325ef88ad0af8f98 (patch) | |
tree | f3624d49ebe0ca9ba41f387d6e99fdc46a02f306 | |
parent | 06ad00a4784771a14ab0c487aa4bd4366cd571c7 (diff) | |
download | mariadb-git-aa96e56c55c44d2c20c1cd70325ef88ad0af8f98.tar.gz |
Improved error messages and added another path to the version check utility
-rw-r--r-- | mysql-test/lib/My/SafeProcess.pm | 4 | ||||
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 16 |
2 files changed, 15 insertions, 5 deletions
diff --git a/mysql-test/lib/My/SafeProcess.pm b/mysql-test/lib/My/SafeProcess.pm index de63218d441..87054019759 100644 --- a/mysql-test/lib/My/SafeProcess.pm +++ b/mysql-test/lib/My/SafeProcess.pm @@ -123,8 +123,8 @@ sub find_bin { } # Wsrep version check utility: $wsrep_check_version= - my_find_bin($bindir, "lib/My/SafeProcess", "wsrep_check_version", - NOT_REQUIRED); + my_find_bin($bindir, ["lib/My/SafeProcess", "My/SafeProcess"], + "wsrep_check_version", NOT_REQUIRED); } diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 630eec67e3d..3cc4a74dda3 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -401,9 +401,19 @@ sub check_wsrep_version() { } sub wsrep_version_message() { - my $output= `$My::SafeProcess::wsrep_check_version -p`; - $output =~ s/\s+\z//; - return "Wsrep provider version mismatch (".$output.")"; + if ($My::SafeProcess::wsrep_check_version ne "") { + my $output= `$My::SafeProcess::wsrep_check_version -p`; + if (($? >> 8) == 0) { + $output =~ s/\s+\z//; + return "Wsrep provider version mismatch (".$output.")"; + } + else { + return "Galera library does not contain a version symbol"; + } + } + else { + return "Unable to find a wsrep version check utility"; + } } sub which($) { return `sh -c "command -v $_[0]"` } |