mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
fixed for mysql-test-run to
* fully support --mysqld=--plugin-load=xxxx * uniformly support all loadable plugins, no need to hard-code every new plugin in mtr * autodetect MTR_VS_CONFIG on windows
This commit is contained in:
@ -18,7 +18,7 @@ use strict;
|
||||
|
||||
use Exporter;
|
||||
use base "Exporter";
|
||||
our @EXPORT= qw / rmtree mkpath copytree /;
|
||||
our @EXPORT= qw /rmtree mkpath copytree/;
|
||||
|
||||
use File::Find;
|
||||
use File::Copy;
|
||||
|
@ -55,7 +55,7 @@ sub collect_option {
|
||||
}
|
||||
|
||||
use File::Basename;
|
||||
use File::Spec::Functions qw / splitdir /;
|
||||
use File::Spec::Functions qw /splitdir/;
|
||||
use IO::File();
|
||||
use My::Config;
|
||||
use My::Platform;
|
||||
@ -68,22 +68,9 @@ require "mtr_misc.pl";
|
||||
my $do_test_reg;
|
||||
my $skip_test_reg;
|
||||
|
||||
# Related to adding InnoDB plugin combinations
|
||||
my $lib_innodb_plugin;
|
||||
|
||||
# If "Quick collect", set to 1 once a test to run has been found.
|
||||
my $some_test_found;
|
||||
|
||||
sub find_innodb_plugin {
|
||||
$lib_innodb_plugin=
|
||||
my_find_file($::basedir,
|
||||
["storage/innodb_plugin", "storage/innodb_plugin/.libs",
|
||||
"lib/mysql/plugin", "lib/mariadb/plugin", "lib/plugin"],
|
||||
["ha_innodb_plugin.dll", "ha_innodb_plugin.so",
|
||||
"ha_innodb_plugin.sl"],
|
||||
NOT_REQUIRED);
|
||||
}
|
||||
|
||||
sub init_pattern {
|
||||
my ($from, $what)= @_;
|
||||
return undef unless defined $from;
|
||||
@ -116,8 +103,6 @@ sub collect_test_cases ($$$) {
|
||||
$do_test_reg= init_pattern($do_test, "--do-test");
|
||||
$skip_test_reg= init_pattern($skip_test, "--skip-test");
|
||||
|
||||
&find_innodb_plugin;
|
||||
|
||||
# If not reordering, we also shouldn't group by suites, unless
|
||||
# no test cases were named.
|
||||
# This also effects some logic in the loop following this.
|
||||
@ -966,36 +951,6 @@ sub collect_one_test_case {
|
||||
return $tinfo;
|
||||
}
|
||||
}
|
||||
elsif ( $tinfo->{'innodb_plugin_test'} )
|
||||
{
|
||||
# This is a test that needs the innodb plugin
|
||||
if (!&find_innodb_plugin)
|
||||
{
|
||||
# innodb plugin is not supported, skip it
|
||||
$tinfo->{'skip'}= 1;
|
||||
$tinfo->{'comment'}= "No innodb plugin support";
|
||||
return $tinfo;
|
||||
}
|
||||
|
||||
my $sep= (IS_WINDOWS) ? ';' : ':';
|
||||
my $plugin_filename= basename($lib_innodb_plugin);
|
||||
my $plugin_list=
|
||||
"innodb=$plugin_filename$sep" .
|
||||
"innodb_trx=$plugin_filename$sep" .
|
||||
"innodb_locks=$plugin_filename$sep" .
|
||||
"innodb_lock_waits=$plugin_filename$sep" .
|
||||
"innodb_cmp=$plugin_filename$sep" .
|
||||
"innodb_cmp_reset=$plugin_filename$sep" .
|
||||
"innodb_cmpmem=$plugin_filename$sep" .
|
||||
"innodb_cmpmem_reset=$plugin_filename";
|
||||
|
||||
foreach my $k ('master_opt', 'slave_opt')
|
||||
{
|
||||
push(@{$tinfo->{$k}}, '--ignore-builtin-innodb');
|
||||
push(@{$tinfo->{$k}}, '--plugin-dir=' . dirname($lib_innodb_plugin));
|
||||
push(@{$tinfo->{$k}}, "--plugin-load=$plugin_list");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
push(@{$tinfo->{'master_opt'}}, "--loose-skip-innodb");
|
||||
@ -1113,7 +1068,7 @@ sub collect_one_test_case {
|
||||
|
||||
if ( $tinfo->{'example_plugin_test'} )
|
||||
{
|
||||
if ( !$ENV{'EXAMPLE_PLUGIN'} )
|
||||
if ( !$ENV{'HA_EXAMPLE_SO'} )
|
||||
{
|
||||
$tinfo->{'skip'}= 1;
|
||||
$tinfo->{'comment'}= "Test requires the 'example' plugin";
|
||||
@ -1165,7 +1120,7 @@ my @tags=
|
||||
|
||||
["include/have_innodb.inc", "innodb_test", 1],
|
||||
["include/have_pbxt.inc", "pbxt_test", 1],
|
||||
["include/have_innodb_plugin.inc", "innodb_plugin_test", 1],
|
||||
["include/have_innodb_plugin.inc", "innodb_test", 1],
|
||||
["include/big_test.inc", "big_test", 1],
|
||||
["include/have_debug.inc", "need_debug", 1],
|
||||
["include/have_ndb.inc", "ndb_test", 1],
|
||||
|
Reference in New Issue
Block a user