Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
ccbfd6ee
Commit
ccbfd6ee
authored
Jan 04, 2010
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql-test-run.pl fix for plugin detection.
parents
122e4436
aa4ce24c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
61 additions
and
54 deletions
+61
-54
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+61
-54
No files found.
mysql-test/mysql-test-run.pl
View file @
ccbfd6ee
...
@@ -301,6 +301,9 @@ sub main {
...
@@ -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,64 @@ sub have_maria_support () {
...
@@ -1877,6 +1880,64 @@ 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
;
}
# --------------------------------------------------------------------------
# Add the path where mysqld will find graph_engine.so
# --------------------------------------------------------------------------
if
(
$mysql_version_id
>=
50100
&&
!
(
IS_WINDOWS
&&
$opt_embedded_server
))
{
my
$plugin_filename
;
if
(
IS_WINDOWS
)
{
$plugin_filename
=
"
oqgraph_engine.dll
";
}
else
{
$plugin_filename
=
"
oqgraph_engine.so
";
}
my
$lib_oqgraph_plugin
=
mtr_file_exists
(
vs_config_dirs
('
storage/oqgraph
',
$plugin_filename
),
"
$basedir
/storage/oqgraph/.libs/
"
.
$plugin_filename
,
"
$basedir
/lib/mariadb/plugin/
"
.
$plugin_filename
,
"
$basedir
/lib/mysql/plugin/
"
.
$plugin_filename
);
$ENV
{'
OQGRAPH_PLUGIN
'}
=
(
$lib_oqgraph_plugin
?
basename
(
$lib_oqgraph_plugin
)
:
"");
$ENV
{'
OQGRAPH_PLUGIN_OPT
'}
=
"
--plugin-dir=
"
.
(
$lib_oqgraph_plugin
?
dirname
(
$lib_oqgraph_plugin
)
:
"");
$ENV
{'
GRAPH_ENGINE_SO
'}
=
"
'
"
.
$plugin_filename
.
"
'
";
$ENV
{'
OQGRAPH_PLUGIN_LOAD
'}
=
"
--plugin_load=;OQGRAPH=
"
.
$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,60 +1996,6 @@ sub environment_setup {
...
@@ -1935,60 +1996,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 graph_engine.so
# --------------------------------------------------------------------------
if
(
$mysql_version_id
>=
50100
&&
!
(
IS_WINDOWS
&&
$opt_embedded_server
))
{
my
$plugin_filename
;
if
(
IS_WINDOWS
)
{
$plugin_filename
=
"
oqgraph_engine.dll
";
}
else
{
$plugin_filename
=
"
oqgraph_engine.so
";
}
my
$lib_oqgraph_plugin
=
mtr_file_exists
(
vs_config_dirs
('
storage/oqgraph
',
$plugin_filename
),
"
$basedir
/storage/oqgraph/.libs/
"
.
$plugin_filename
,
"
$basedir
/lib/mariadb/plugin/
"
.
$plugin_filename
,
"
$basedir
/lib/mysql/plugin/
"
.
$plugin_filename
);
$ENV
{'
OQGRAPH_PLUGIN
'}
=
(
$lib_oqgraph_plugin
?
basename
(
$lib_oqgraph_plugin
)
:
"");
$ENV
{'
OQGRAPH_PLUGIN_OPT
'}
=
"
--plugin-dir=
"
.
(
$lib_oqgraph_plugin
?
dirname
(
$lib_oqgraph_plugin
)
:
"");
$ENV
{'
GRAPH_ENGINE_SO
'}
=
"
'
"
.
$plugin_filename
.
"
'
";
$ENV
{'
OQGRAPH_PLUGIN_LOAD
'}
=
"
--plugin_load=;OQGRAPH=
"
.
$plugin_filename
.
"
;
";
}
# ----------------------------------------------------
# ----------------------------------------------------
# Add the path where mysqld will find mypluglib.so
# Add the path where mysqld will find mypluglib.so
# ----------------------------------------------------
# ----------------------------------------------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment