mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
overlay support for mysql-test-run and mysqltest
mysql-test-run auto-disables all optional plugins. mysql-test/include/default_client.cnf: no @OPT.plugindir anymore mysql-test/include/default_mysqld.cnf: don't disable plugins manually - mtr can do it better mysql-test/suite/innodb/t/innodb_bug47167.test: mtr now uses suite-dir as an include path mysql-test/suite/innodb/t/innodb_file_format.test: mtr now uses suite-dir as an include path mysql-test/t/partition_binlog.test: this test uses partitions storage/example/mysql-test/mtr/t/source.result: update results. as mysqltest includes the correct overlayed include storage/innobase/handler/ha_innodb.cc: the assert is wrong
This commit is contained in:
@@ -64,7 +64,7 @@ sub my_find_bin {
|
||||
# -------------------------------------------------------
|
||||
# Find and return the first executable
|
||||
# -------------------------------------------------------
|
||||
foreach my $path (my_find_paths($base, $paths, $names, $bin_extension)) {
|
||||
foreach my $path (my_build_path_list($base, $paths, $names, $bin_extension)) {
|
||||
return $path if ( -x $path or (IS_WINDOWS and -f $path) );
|
||||
}
|
||||
if (defined $required and $required == NOT_REQUIRED){
|
||||
@@ -98,7 +98,7 @@ sub my_find_file {
|
||||
# -------------------------------------------------------
|
||||
# Find and return the first executable
|
||||
# -------------------------------------------------------
|
||||
foreach my $path (my_find_paths($base, $paths, $names, $bin_extension)) {
|
||||
foreach my $path (my_build_path_list($base, $paths, $names, $bin_extension)) {
|
||||
return $path if ( -f $path );
|
||||
}
|
||||
if (defined $required and $required == NOT_REQUIRED){
|
||||
@@ -110,8 +110,9 @@ sub my_find_file {
|
||||
|
||||
|
||||
#
|
||||
# my_find_dir - find the first existing directory in one of
|
||||
# the given paths
|
||||
# my_find_dir - find the existing directories in one of
|
||||
# the given paths. Returns the first found in the scalar context
|
||||
# and all of them in the list context.
|
||||
#
|
||||
# Example:
|
||||
# my $charset_set= my_find_dir($basedir,
|
||||
@@ -127,20 +128,22 @@ sub my_find_file {
|
||||
#
|
||||
sub my_find_dir {
|
||||
my ($base, $paths, $dirs, $required)= @_;
|
||||
croak "usage: my_find_dir(<base>, <paths>[, <dirs>])"
|
||||
unless (@_ == 3 or @_ == 2);
|
||||
croak "usage: my_find_dir(<base>, <paths>[, <dirs>[, <required>]])"
|
||||
unless (@_ >= 2 and @_ <= 4);
|
||||
|
||||
# -------------------------------------------------------
|
||||
# Find and return the first directory
|
||||
# -------------------------------------------------------
|
||||
foreach my $path (my_find_paths($base, $paths, $dirs)) {
|
||||
return $path if ( -d $path );
|
||||
my @all;
|
||||
foreach my $path (my_build_path_list($base, $paths, $dirs)) {
|
||||
next unless -d $path;
|
||||
return $path unless wantarray;
|
||||
push @all, $path;
|
||||
}
|
||||
return @all if @all;
|
||||
return wantarray ? () : "" if defined $required and $required == NOT_REQUIRED;
|
||||
find_error($base, $paths, $dirs);
|
||||
}
|
||||
|
||||
|
||||
sub my_find_paths {
|
||||
sub my_build_path_list {
|
||||
my ($base, $paths, $names, $extension)= @_;
|
||||
|
||||
# Convert the arguments into two normal arrays to ease
|
||||
@@ -237,7 +240,7 @@ sub find_error {
|
||||
|
||||
croak "** ERROR: Could not find ",
|
||||
commify(fnuttify(@names)), " in ",
|
||||
commify(fnuttify(my_find_paths($base, $paths, $names))), "\n";
|
||||
commify(fnuttify(my_build_path_list($base, $paths, $names))), "\n";
|
||||
}
|
||||
|
||||
1;
|
||||
|
Reference in New Issue
Block a user