mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
cleanup: mtr and plugins
* in --parallel mode don't copy/symlinks plugins individually in each forked child's vardir, use the common parent vardir with all plugins * move pam plugin specific code from mysql-test-run.pl to suite/plugins/suite.pm
This commit is contained in:
@ -2580,6 +2580,8 @@ sub setup_vardir() {
|
||||
copytree("$glob_mysql_test_dir/std_data", "$opt_vardir/std_data", "0022");
|
||||
|
||||
# create a plugin dir and copy or symlink plugins into it
|
||||
unless($plugindir)
|
||||
{
|
||||
if ($source_dist)
|
||||
{
|
||||
$plugindir="$opt_vardir/plugins";
|
||||
@ -2608,19 +2610,6 @@ sub setup_vardir() {
|
||||
unlink "$plugindir/symlink_test";
|
||||
}
|
||||
|
||||
for (<$bindir/plugin/auth_pam/auth_pam_tool>)
|
||||
{
|
||||
mkpath("$plugindir/auth_pam_tool_dir");
|
||||
if ($opt_use_copy)
|
||||
{
|
||||
copy rel2abs($_), "$plugindir/auth_pam_tool_dir/auth_pam_tool"
|
||||
}
|
||||
else
|
||||
{
|
||||
symlink rel2abs($_), "$plugindir/auth_pam_tool_dir/auth_pam_tool";
|
||||
}
|
||||
}
|
||||
|
||||
for (<$bindir/storage/*/*.so>,
|
||||
<$bindir/plugin/*/*.so>,
|
||||
<$bindir/plugin/*/auth_pam_tool_dir>,
|
||||
@ -2643,7 +2632,6 @@ sub setup_vardir() {
|
||||
}
|
||||
else
|
||||
{
|
||||
$plugindir= $mysqld_variables{'plugin-dir'} || '.';
|
||||
# hm, what paths work for debs and for rpms ?
|
||||
for (<$bindir/lib64/mysql/plugin/*.so>,
|
||||
<$bindir/lib/mysql/plugin/*.so>,
|
||||
@ -2654,6 +2642,8 @@ sub setup_vardir() {
|
||||
{
|
||||
my $pname=basename($_);
|
||||
set_plugin_var($pname);
|
||||
$plugindir=dirname($_) unless $plugindir;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4,6 +4,13 @@ use My::Platform;
|
||||
|
||||
@ISA = qw(My::Suite);
|
||||
|
||||
if (-d '../sql') {
|
||||
my $src = "$::bindir/plugin/auth_pam/auth_pam_tool";
|
||||
my $dst = "$::plugindir/auth_pam_tool_dir/auth_pam_tool";
|
||||
::mkpath( "$::plugindir/auth_pam_tool_dir");
|
||||
symlink $src, $dst or ::copy $src, $dst;
|
||||
}
|
||||
|
||||
sub cassandra_running() {
|
||||
return 0 if IS_WINDOWS;
|
||||
system 'echo show version | cqlsh -3 2>/dev/null >/dev/null';
|
||||
|
Reference in New Issue
Block a user