Commit 4fef6443 authored by Sergei Golubchik's avatar Sergei Golubchik

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
parent d84792b6
......@@ -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';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment