mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Adapt to running from "binary dist"
Add function mtr_exe_maybe_exists to look for binaries that is optional Skip ndb support if it's a binary dist where mysqld supports ndb but there is no ndbd mysql-test/lib/mtr_misc.pl: Add function mtr_exe_maybe_exists mysql-test/mysql-test-run.pl: Adapt to running from binary dist Add function mtr_exe_maybe_exists to look for binaries that is optional Skip ndb support if it's a binary dist where mysqld supports ndb but there is no ndbd
This commit is contained in:
@ -14,6 +14,7 @@ sub mtr_path_exists(@);
|
||||
sub mtr_script_exists(@);
|
||||
sub mtr_file_exists(@);
|
||||
sub mtr_exe_exists(@);
|
||||
sub mtr_exe_maybe_exists(@);
|
||||
sub mtr_copy_dir($$);
|
||||
sub mtr_same_opts($$);
|
||||
sub mtr_cmp_opts($$);
|
||||
@ -110,8 +111,9 @@ sub mtr_file_exists (@) {
|
||||
return "";
|
||||
}
|
||||
|
||||
sub mtr_exe_exists (@) {
|
||||
sub mtr_exe_maybe_exists (@) {
|
||||
my @path= @_;
|
||||
|
||||
map {$_.= ".exe"} @path if $::glob_win32;
|
||||
foreach my $path ( @path )
|
||||
{
|
||||
@ -124,6 +126,16 @@ sub mtr_exe_exists (@) {
|
||||
return $path if -x $path;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
sub mtr_exe_exists (@) {
|
||||
my @path= @_;
|
||||
if (my $path= mtr_exe_maybe_exists(@path))
|
||||
{
|
||||
return $path;
|
||||
}
|
||||
# Could not find exe, show error
|
||||
if ( @path == 1 )
|
||||
{
|
||||
mtr_error("Could not find $path[0]");
|
||||
|
Reference in New Issue
Block a user