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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
1cfcd564
Commit
1cfcd564
authored
May 06, 2005
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb - add support for mysql servers in autotest
parent
ab6e7da4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
22 deletions
+20
-22
ndb/test/run-test/main.cpp
ndb/test/run-test/main.cpp
+19
-22
ndb/test/run-test/run-test.hpp
ndb/test/run-test/run-test.hpp
+1
-0
No files found.
ndb/test/run-test/main.cpp
View file @
1cfcd564
...
...
@@ -116,10 +116,7 @@ main(int argc, const char ** argv){
*/
if
(
restart
){
g_logger
.
info
(
"(Re)starting ndb processes"
);
if
(
!
stop_processes
(
g_config
,
atrt_process
::
NDB_MGM
))
goto
end
;
if
(
!
stop_processes
(
g_config
,
atrt_process
::
NDB_DB
))
if
(
!
stop_processes
(
g_config
,
~
0
))
goto
end
;
if
(
!
start_processes
(
g_config
,
atrt_process
::
NDB_MGM
))
...
...
@@ -142,6 +139,9 @@ main(int argc, const char ** argv){
goto
end
;
started:
if
(
!
start_processes
(
g_config
,
p_servers
))
goto
end
;
g_logger
.
info
(
"Ndb start completed"
);
}
...
...
@@ -158,9 +158,6 @@ main(int argc, const char ** argv){
if
(
!
setup_test_case
(
g_config
,
test_case
))
goto
end
;
if
(
!
start_processes
(
g_config
,
p_servers
))
goto
end
;
if
(
!
start_processes
(
g_config
,
p_clients
))
goto
end
;
...
...
@@ -201,9 +198,6 @@ main(int argc, const char ** argv){
if
(
!
stop_processes
(
g_config
,
p_clients
))
goto
end
;
if
(
!
stop_processes
(
g_config
,
p_servers
))
goto
end
;
if
(
!
gather_result
(
g_config
,
&
result
))
goto
end
;
...
...
@@ -476,21 +470,18 @@ setup_config(atrt_config& config){
proc
.
m_proc
.
m_path
.
assign
(
dir
).
append
(
"/libexec/mysqld"
);
proc
.
m_proc
.
m_args
=
"--core-file --ndbcluster"
;
proc
.
m_proc
.
m_cwd
.
appfmt
(
"%d.mysqld"
,
index
);
if
(
mysql_port_offset
>
0
||
g_mysqld_use_base
){
// setup mysql specific stuff
const
char
*
basedir
=
proc
.
m_proc
.
m_cwd
.
c_str
();
proc
.
m_proc
.
m_args
.
appfmt
(
"--datadir=%s"
,
basedir
);
proc
.
m_proc
.
m_args
.
appfmt
(
"--pid-file=%s/mysql.pid"
,
basedir
);
proc
.
m_proc
.
m_args
.
appfmt
(
"--socket=%s/mysql.sock"
,
basedir
);
proc
.
m_proc
.
m_args
.
appfmt
(
"--port=%d"
,
g_default_base_port
-
(
++
mysql_port_offset
));
}
}
else
if
(
split1
[
0
]
==
"api"
){
proc
.
m_type
=
atrt_process
::
NDB_API
;
proc
.
m_proc
.
m_name
.
assfmt
(
"%d-%s"
,
index
,
"ndb_api"
);
proc
.
m_proc
.
m_path
=
""
;
proc
.
m_proc
.
m_args
=
""
;
proc
.
m_proc
.
m_cwd
.
appfmt
(
"%d.ndb_api"
,
index
);
}
else
if
(
split1
[
0
]
==
"mysql"
){
proc
.
m_type
=
atrt_process
::
MYSQL_CLIENT
;
proc
.
m_proc
.
m_name
.
assfmt
(
"%d-%s"
,
index
,
"mysql"
);
proc
.
m_proc
.
m_path
=
""
;
proc
.
m_proc
.
m_args
=
""
;
proc
.
m_proc
.
m_cwd
.
appfmt
(
"%d.mysql"
,
index
);
}
else
{
g_logger
.
critical
(
"%s:%d: Unhandled process type: %s"
,
g_process_config_filename
,
lineno
,
...
...
@@ -913,6 +904,11 @@ read_test_case(FILE * file, atrt_testcase& tc, int& line){
tc
.
m_report
=
true
;
else
tc
.
m_report
=
false
;
if
(
p
.
get
(
"run-all"
,
&
mt
)
&&
strcmp
(
mt
,
"yes"
)
==
0
)
tc
.
m_run_all
=
true
;
else
tc
.
m_run_all
=
false
;
return
true
;
}
...
...
@@ -928,16 +924,17 @@ setup_test_case(atrt_config& config, const atrt_testcase& tc){
size_t
i
=
0
;
for
(;
i
<
config
.
m_processes
.
size
();
i
++
){
atrt_process
&
proc
=
config
.
m_processes
[
i
];
if
(
proc
.
m_type
==
atrt_process
::
NDB_API
){
if
(
proc
.
m_type
==
atrt_process
::
NDB_API
||
proc
.
m_type
==
atrt_process
::
MYSQL_CLIENT
){
proc
.
m_proc
.
m_path
.
assfmt
(
"%s/bin/%s"
,
proc
.
m_host
->
m_base_dir
.
c_str
(),
tc
.
m_command
.
c_str
());
proc
.
m_proc
.
m_args
.
assign
(
tc
.
m_args
);
break
;
if
(
!
tc
.
m_run_all
)
break
;
}
}
for
(
i
++
;
i
<
config
.
m_processes
.
size
();
i
++
){
atrt_process
&
proc
=
config
.
m_processes
[
i
];
if
(
proc
.
m_type
==
atrt_process
::
NDB_API
){
if
(
proc
.
m_type
==
atrt_process
::
NDB_API
||
proc
.
m_type
==
atrt_process
::
MYSQL_CLIENT
){
proc
.
m_proc
.
m_path
.
assign
(
""
);
proc
.
m_proc
.
m_args
.
assign
(
""
);
}
...
...
ndb/test/run-test/run-test.hpp
View file @
1cfcd564
...
...
@@ -69,6 +69,7 @@ struct atrt_config {
struct
atrt_testcase
{
bool
m_report
;
bool
m_run_all
;
time_t
m_max_time
;
BaseString
m_command
;
BaseString
m_args
;
...
...
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