summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Goryavsky <julius.goryavsky@mariadb.com>2019-07-09 16:54:08 +0200
committerJulius Goryavsky <julius.goryavsky@mariadb.com>2019-07-09 16:54:08 +0200
commitb2440e741dfe42acadcd4db09b8f8b88b6c3dc42 (patch)
tree885dc4139b6b39ffce7354a402fbbcb1d5ad4bf2
parentcf7a8b9eb20e21baf2c9d81bac02e69acfabcd03 (diff)
downloadmariadb-git-bb-10.3-sysprg-vcheck.tar.gz
Improved error messages and added another path to the version check utilitybb-10.3-sysprg-vcheck
-rw-r--r--mysql-test/lib/My/SafeProcess.pm4
-rwxr-xr-xmysql-test/mysql-test-run.pl16
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]"` }