Fix that all tests using example_plugin.so became disabled.
The test for availability was done before detection (oops).
This commit is contained in:
parent
a4eb3f44ae
commit
aa4ce24cc5
@ -301,6 +301,9 @@ sub main {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Check for plugin availability so we know whether to skip tests or not.
|
||||||
|
detect_plugins();
|
||||||
|
|
||||||
mtr_report("Collecting tests...");
|
mtr_report("Collecting tests...");
|
||||||
my $tests= collect_test_cases($opt_suites, \@opt_cases);
|
my $tests= collect_test_cases($opt_suites, \@opt_cases);
|
||||||
|
|
||||||
@ -1877,6 +1880,37 @@ sub have_maria_support () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Detect plugin presense and set environment variables appropriately.
|
||||||
|
# This needs to be done early, so we can know whether to skip tests.
|
||||||
|
sub detect_plugins {
|
||||||
|
# --------------------------------------------------------------------------
|
||||||
|
# Add the path where mysqld will find ha_example.so
|
||||||
|
# --------------------------------------------------------------------------
|
||||||
|
if ($mysql_version_id >= 50100) {
|
||||||
|
my $plugin_filename;
|
||||||
|
if (IS_WINDOWS)
|
||||||
|
{
|
||||||
|
$plugin_filename = "ha_example.dll";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$plugin_filename = "ha_example.so";
|
||||||
|
}
|
||||||
|
my $lib_example_plugin=
|
||||||
|
mtr_file_exists(vs_config_dirs('storage/example',$plugin_filename),
|
||||||
|
"$basedir/storage/example/.libs/".$plugin_filename,
|
||||||
|
"$basedir/lib/mariadb/plugin/".$plugin_filename,
|
||||||
|
"$basedir/lib/mysql/plugin/".$plugin_filename);
|
||||||
|
$ENV{'EXAMPLE_PLUGIN'}=
|
||||||
|
($lib_example_plugin ? basename($lib_example_plugin) : "");
|
||||||
|
$ENV{'EXAMPLE_PLUGIN_OPT'}= "--plugin-dir=".
|
||||||
|
($lib_example_plugin ? dirname($lib_example_plugin) : "");
|
||||||
|
|
||||||
|
$ENV{'HA_EXAMPLE_SO'}="'".$plugin_filename."'";
|
||||||
|
$ENV{'EXAMPLE_PLUGIN_LOAD'}="--plugin_load=EXAMPLE=".$plugin_filename;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Set environment to be used by childs of this process for
|
# Set environment to be used by childs of this process for
|
||||||
# things that are constant during the whole lifetime of mysql-test-run
|
# things that are constant during the whole lifetime of mysql-test-run
|
||||||
@ -1935,33 +1969,6 @@ sub environment_setup {
|
|||||||
$ENV{'UDF_EXAMPLE_LIB_OPT'}= "--plugin-dir=".
|
$ENV{'UDF_EXAMPLE_LIB_OPT'}= "--plugin-dir=".
|
||||||
($lib_udf_example ? dirname($lib_udf_example) : "");
|
($lib_udf_example ? dirname($lib_udf_example) : "");
|
||||||
|
|
||||||
# --------------------------------------------------------------------------
|
|
||||||
# Add the path where mysqld will find ha_example.so
|
|
||||||
# --------------------------------------------------------------------------
|
|
||||||
if ($mysql_version_id >= 50100) {
|
|
||||||
my $plugin_filename;
|
|
||||||
if (IS_WINDOWS)
|
|
||||||
{
|
|
||||||
$plugin_filename = "ha_example.dll";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$plugin_filename = "ha_example.so";
|
|
||||||
}
|
|
||||||
my $lib_example_plugin=
|
|
||||||
mtr_file_exists(vs_config_dirs('storage/example',$plugin_filename),
|
|
||||||
"$basedir/storage/example/.libs/".$plugin_filename,
|
|
||||||
"$basedir/lib/mariadb/plugin/".$plugin_filename,
|
|
||||||
"$basedir/lib/mysql/plugin/".$plugin_filename);
|
|
||||||
$ENV{'EXAMPLE_PLUGIN'}=
|
|
||||||
($lib_example_plugin ? basename($lib_example_plugin) : "");
|
|
||||||
$ENV{'EXAMPLE_PLUGIN_OPT'}= "--plugin-dir=".
|
|
||||||
($lib_example_plugin ? dirname($lib_example_plugin) : "");
|
|
||||||
|
|
||||||
$ENV{'HA_EXAMPLE_SO'}="'".$plugin_filename."'";
|
|
||||||
$ENV{'EXAMPLE_PLUGIN_LOAD'}="--plugin_load=EXAMPLE=".$plugin_filename;
|
|
||||||
}
|
|
||||||
|
|
||||||
# ----------------------------------------------------
|
# ----------------------------------------------------
|
||||||
# Add the path where mysqld will find mypluglib.so
|
# Add the path where mysqld will find mypluglib.so
|
||||||
# ----------------------------------------------------
|
# ----------------------------------------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user