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
3d42998c
Commit
3d42998c
authored
Oct 18, 2006
by
msvensson@shellback.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge shellback.(none):/home/msvensson/mysql/mysql-5.0-maint
into shellback.(none):/home/msvensson/mysql/mysql-5.1-maint
parents
0fdfb362
f83e9e4f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
104 additions
and
98 deletions
+104
-98
mysql-test/lib/mtr_cases.pl
mysql-test/lib/mtr_cases.pl
+42
-39
mysql-test/lib/mtr_process.pl
mysql-test/lib/mtr_process.pl
+0
-2
mysql-test/lib/mtr_report.pl
mysql-test/lib/mtr_report.pl
+4
-8
mysql-test/lib/mtr_timer.pl
mysql-test/lib/mtr_timer.pl
+15
-14
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+43
-35
No files found.
mysql-test/lib/mtr_cases.pl
View file @
3d42998c
...
@@ -59,7 +59,9 @@ sub collect_test_cases ($) {
...
@@ -59,7 +59,9 @@ sub collect_test_cases ($) {
if
(
@::opt_cases
)
if
(
@::opt_cases
)
{
{
foreach
my
$tname
(
@::opt_cases
)
{
# Run in specified order, no sort
foreach
my
$tname
(
@::opt_cases
)
{
# Run in specified order, no sort
my
$elem
=
undef
;
my
$elem
=
undef
;
my
$component_id
=
undef
;
my
$component_id
=
undef
;
...
@@ -85,7 +87,7 @@ sub collect_test_cases ($) {
...
@@ -85,7 +87,7 @@ sub collect_test_cases ($) {
# If target component is known, check that the specified test case
# If target component is known, check that the specified test case
# exists.
# exists.
#
#
# Otherwise, try to guess the target component.
# Otherwise, try to guess the target component.
if
(
$component_id
)
if
(
$component_id
)
...
@@ -127,7 +129,8 @@ sub collect_test_cases ($) {
...
@@ -127,7 +129,8 @@ sub collect_test_cases ($) {
}
}
else
else
{
{
foreach
my
$elem
(
sort
readdir
(
TESTDIR
)
)
{
foreach
my
$elem
(
sort
readdir
(
TESTDIR
)
)
{
my
$component_id
=
undef
;
my
$component_id
=
undef
;
my
$tname
=
undef
;
my
$tname
=
undef
;
...
@@ -144,7 +147,9 @@ sub collect_test_cases ($) {
...
@@ -144,7 +147,9 @@ sub collect_test_cases ($) {
next
;
next
;
}
}
next
if
$::opt_do_test
and
!
defined
mtr_match_prefix
(
$elem
,
$::opt_do_test
);
# Skip tests that does not match the --do-test= filter
next
if
$::opt_do_test
and
!
defined
mtr_match_prefix
(
$elem
,
$::opt_do_test
);
collect_one_test_case
(
$testdir
,
$resdir
,
$tname
,
$elem
,
$cases
,
\%
disabled
,
collect_one_test_case
(
$testdir
,
$resdir
,
$tname
,
$elem
,
$cases
,
\%
disabled
,
$component_id
);
$component_id
);
...
@@ -152,7 +157,7 @@ sub collect_test_cases ($) {
...
@@ -152,7 +157,7 @@ sub collect_test_cases ($) {
closedir
TESTDIR
;
closedir
TESTDIR
;
}
}
# Reorder the test cases in an order that wil make them faster to run
# Reorder the test cases in an order that wil
l
make them faster to run
if
(
$::opt_reorder
)
if
(
$::opt_reorder
)
{
{
...
@@ -306,40 +311,6 @@ sub collect_one_test_case($$$$$$$) {
...
@@ -306,40 +311,6 @@ sub collect_one_test_case($$$$$$$) {
$tinfo
->
{'
slave_num
'}
=
1
;
$tinfo
->
{'
slave_num
'}
=
1
;
}
}
if
(
$::opt_with_ndbcluster
or
defined
mtr_match_substring
(
$tname
,"
ndb
")
)
{
# This is an ndb test or all tests should be run with ndb cluster started
$tinfo
->
{'
ndb_test
'}
=
1
;
if
(
!
$::opt_ndbcluster_supported
)
{
# Ndb is not supported, skip them
$tinfo
->
{'
skip
'}
=
1
;
$tinfo
->
{'
comment
'}
=
"
No ndbcluster support
";
return
;
}
elsif
(
$::opt_skip_ndbcluster
)
{
# All ndb test's should be skipped
$tinfo
->
{'
skip
'}
=
1
;
$tinfo
->
{'
comment
'}
=
"
No ndbcluster tests(--skip-ndbcluster)
";
return
;
}
}
else
{
# This is not a ndb test
$tinfo
->
{'
ndb_test
'}
=
0
;
if
(
$::opt_with_ndbcluster_only
)
{
# Only the ndb test should be run, all other should be skipped
$tinfo
->
{'
skip
'}
=
1
;
$tinfo
->
{'
comment
'}
=
"
Only ndbcluster tests(--with-ndbcluster-only)
";
return
;
}
}
# FIXME what about embedded_server + ndbcluster, skip ?!
my
$master_opt_file
=
"
$testdir
/
$tname
-master.opt
";
my
$master_opt_file
=
"
$testdir
/
$tname
-master.opt
";
my
$slave_opt_file
=
"
$testdir
/
$tname
-slave.opt
";
my
$slave_opt_file
=
"
$testdir
/
$tname
-slave.opt
";
my
$slave_mi_file
=
"
$testdir
/
$tname
.slave-mi
";
my
$slave_mi_file
=
"
$testdir
/
$tname
.slave-mi
";
...
@@ -550,6 +521,37 @@ sub collect_one_test_case($$$$$$$) {
...
@@ -550,6 +521,37 @@ sub collect_one_test_case($$$$$$$) {
$tinfo
->
{'
comment
'}
=
"
Test need debug binaries
";
$tinfo
->
{'
comment
'}
=
"
Test need debug binaries
";
return
;
return
;
}
}
if
(
$tinfo
->
{'
ndb_test
'}
)
{
# This is a NDB test
if
(
!
$::glob_ndbcluster_supported
)
{
# Ndb is not supported, skip it
$tinfo
->
{'
skip
'}
=
1
;
$tinfo
->
{'
comment
'}
=
"
No ndbcluster support
";
return
;
}
elsif
(
$::opt_skip_ndbcluster
)
{
# All ndb test's should be skipped
$tinfo
->
{'
skip
'}
=
1
;
$tinfo
->
{'
comment
'}
=
"
No ndbcluster tests(--skip-ndbcluster)
";
return
;
}
}
else
{
# This is not a ndb test
if
(
$::opt_with_ndbcluster_only
)
{
# Only the ndb test should be run, all other should be skipped
$tinfo
->
{'
skip
'}
=
1
;
$tinfo
->
{'
comment
'}
=
"
Only ndbcluster tests(--with-ndbcluster-only)
";
return
;
}
}
}
}
}
}
...
@@ -563,6 +565,7 @@ our @tags=
...
@@ -563,6 +565,7 @@ our @tags=
["
include/have_binlog_format_statement.inc
",
"
binlog_format
",
"
stmt
"],
["
include/have_binlog_format_statement.inc
",
"
binlog_format
",
"
stmt
"],
["
include/big_test.inc
",
"
big_test
",
1
],
["
include/big_test.inc
",
"
big_test
",
1
],
["
include/have_debug.inc
",
"
need_debug
",
1
],
["
include/have_debug.inc
",
"
need_debug
",
1
],
["
include/have_ndb.inc
",
"
ndb_test
",
1
],
["
include/have_ndb_extra.inc
",
"
ndb_extra
",
1
],
["
include/have_ndb_extra.inc
",
"
ndb_extra
",
1
],
["
require_manager
",
"
require_manager
",
1
],
["
require_manager
",
"
require_manager
",
1
],
);
);
...
...
mysql-test/lib/mtr_process.pl
View file @
3d42998c
...
@@ -8,7 +8,6 @@ use Socket;
...
@@ -8,7 +8,6 @@ use Socket;
use
Errno
;
use
Errno
;
use
strict
;
use
strict
;
#use POSIX ":sys_wait_h";
use
POSIX
'
WNOHANG
';
use
POSIX
'
WNOHANG
';
sub
mtr_run
($$$$$$
;
$
);
sub
mtr_run
($$$$$$
;
$
);
...
@@ -1088,7 +1087,6 @@ sub mtr_kill_processes ($) {
...
@@ -1088,7 +1087,6 @@ sub mtr_kill_processes ($) {
sub
mtr_exit
($)
{
sub
mtr_exit
($)
{
my
$code
=
shift
;
my
$code
=
shift
;
# cluck("Called mtr_exit()");
mtr_timer_stop_all
(
$::glob_timers
);
mtr_timer_stop_all
(
$::glob_timers
);
local
$SIG
{
HUP
}
=
'
IGNORE
';
local
$SIG
{
HUP
}
=
'
IGNORE
';
# ToDo: Signalling -$$ will only work if we are the process group
# ToDo: Signalling -$$ will only work if we are the process group
...
...
mysql-test/lib/mtr_report.pl
View file @
3d42998c
...
@@ -130,16 +130,11 @@ sub mtr_report_test_failed ($) {
...
@@ -130,16 +130,11 @@ sub mtr_report_test_failed ($) {
my
$tinfo
=
shift
;
my
$tinfo
=
shift
;
$tinfo
->
{'
result
'}
=
'
MTR_RES_FAILED
';
$tinfo
->
{'
result
'}
=
'
MTR_RES_FAILED
';
if
(
$tinfo
->
{'
timeout
'}
)
if
(
defined
$tinfo
->
{'
timeout
'}
)
{
{
print
"
[ fail ] timeout
\n
";
print
"
[ fail ] timeout
\n
";
return
;
return
;
}
}
elsif
(
$tinfo
->
{'
ndb_test
'}
and
$::cluster
->
[
0
]
->
{'
installed_ok
'}
eq
"
NO
")
{
print
"
[ fail ] ndbcluster start failure
\n
";
return
;
}
else
else
{
{
print
"
[ fail ]
\n
";
print
"
[ fail ]
\n
";
...
@@ -208,8 +203,9 @@ sub mtr_report_stats ($) {
...
@@ -208,8 +203,9 @@ sub mtr_report_stats ($) {
else
else
{
{
my
$ratio
=
$tot_passed
*
100
/
$tot_tests
;
my
$ratio
=
$tot_passed
*
100
/
$tot_tests
;
printf
"
Failed
$tot_failed
/
$tot_tests
tests,
"
.
print
"
Failed
$tot_failed
/
$tot_tests
tests,
";
"
%.2f
\
% were successful.
\n\n
",
$ratio
;
printf
("
%.2f
",
$ratio
);
print
"
\
% were successful.
\n\n
";
print
print
"
The log files in var/log may give you some hint
\n
",
"
The log files in var/log may give you some hint
\n
",
"
of what went wrong.
\n
",
"
of what went wrong.
\n
",
...
...
mysql-test/lib/mtr_timer.pl
View file @
3d42998c
...
@@ -4,23 +4,19 @@
...
@@ -4,23 +4,19 @@
# and is part of the translation of the Bourne shell script with the
# and is part of the translation of the Bourne shell script with the
# same name.
# same name.
use
Carp
qw(cluck)
;
use
Socket
;
use
Socket
;
use
Errno
;
use
Errno
;
use
strict
;
use
strict
;
#use POSIX ":sys_wait_h";
use
POSIX
'
WNOHANG
';
sub
mtr_init_timers
();
sub
mtr_init_timers
();
sub
mtr_timer_start
($$$);
sub
mtr_timer_start
($$$);
sub
mtr_timer_stop
($$);
sub
mtr_timer_stop
($$);
sub
mtr_timer_stop_all
($);
sub
mtr_timer_stop_all
($);
sub
mtr_timer_waitpid
($$$);
##############################################################################
##############################################################################
#
#
# Initiate
a
structure shared by all timers
# Initiate
the
structure shared by all timers
#
#
##############################################################################
##############################################################################
...
@@ -35,17 +31,19 @@ sub mtr_init_timers () {
...
@@ -35,17 +31,19 @@ sub mtr_init_timers () {
# Start, stop and poll a timer
# Start, stop and poll a timer
#
#
# As alarm() isn't portable to Windows, we use separate processes to
# As alarm() isn't portable to Windows, we use separate processes to
# implement timers. That is why there is a mtr_timer_waitpid(), as this
# implement timers.
# is where we catch a timeout.
#
#
##############################################################################
##############################################################################
sub
mtr_timer_start
($$$)
{
sub
mtr_timer_start
($$$)
{
my
(
$timers
,
$name
,
$duration
)
=
@_
;
my
(
$timers
,
$name
,
$duration
)
=
@_
;
mtr_verbose
("
mtr_timer_start:
$name
,
$duration
");
if
(
exists
$timers
->
{'
timers
'}
->
{
$name
}
)
if
(
exists
$timers
->
{'
timers
'}
->
{
$name
}
)
{
{
# We have an old running timer, kill it
# We have an old running timer, kill it
mtr_verbose
("
There is an old timer running
");
mtr_timer_stop
(
$timers
,
$name
);
mtr_timer_stop
(
$timers
,
$name
);
}
}
...
@@ -57,7 +55,7 @@ sub mtr_timer_start($$$) {
...
@@ -57,7 +55,7 @@ sub mtr_timer_start($$$) {
{
{
if
(
$!
==
$!
{
EAGAIN
}
)
# See "perldoc Errno"
if
(
$!
==
$!
{
EAGAIN
}
)
# See "perldoc Errno"
{
{
mtr_
debu
g
("
Got EAGAIN from fork(), sleep 1 second and redo
");
mtr_
warnin
g
("
Got EAGAIN from fork(), sleep 1 second and redo
");
sleep
(
1
);
sleep
(
1
);
redo
FORK
;
redo
FORK
;
}
}
...
@@ -70,6 +68,7 @@ sub mtr_timer_start($$$) {
...
@@ -70,6 +68,7 @@ sub mtr_timer_start($$$) {
if
(
$tpid
)
if
(
$tpid
)
{
{
# Parent, record the information
# Parent, record the information
mtr_verbose
("
timer parent, record info(
$name
,
$tpid
,
$duration
)
");
$timers
->
{'
timers
'}
->
{
$name
}
->
{'
pid
'}
=
$tpid
;
$timers
->
{'
timers
'}
->
{
$name
}
->
{'
pid
'}
=
$tpid
;
$timers
->
{'
timers
'}
->
{
$name
}
->
{'
duration
'}
=
$duration
;
$timers
->
{'
timers
'}
->
{
$name
}
->
{'
duration
'}
=
$duration
;
$timers
->
{'
pids
'}
->
{
$tpid
}
=
$name
;
$timers
->
{'
pids
'}
->
{
$tpid
}
=
$name
;
...
@@ -85,6 +84,7 @@ sub mtr_timer_start($$$) {
...
@@ -85,6 +84,7 @@ sub mtr_timer_start($$$) {
$SIG
{
INT
}
=
'
DEFAULT
';
$SIG
{
INT
}
=
'
DEFAULT
';
$0
=
"
mtr_timer(timers,
$name
,
$duration
)
";
$0
=
"
mtr_timer(timers,
$name
,
$duration
)
";
mtr_verbose
("
timer child
$name
, sleep
$duration
");
sleep
(
$duration
);
sleep
(
$duration
);
exit
(
0
);
exit
(
0
);
}
}
...
@@ -95,9 +95,12 @@ sub mtr_timer_start($$$) {
...
@@ -95,9 +95,12 @@ sub mtr_timer_start($$$) {
sub
mtr_timer_stop
($$)
{
sub
mtr_timer_stop
($$)
{
my
(
$timers
,
$name
)
=
@_
;
my
(
$timers
,
$name
)
=
@_
;
mtr_verbose
("
mtr_timer_stop:
$name
");
if
(
exists
$timers
->
{'
timers
'}
->
{
$name
}
)
if
(
exists
$timers
->
{'
timers
'}
->
{
$name
}
)
{
{
my
$tpid
=
$timers
->
{'
timers
'}
->
{
$name
}
->
{'
pid
'};
my
$tpid
=
$timers
->
{'
timers
'}
->
{
$name
}
->
{'
pid
'};
mtr_verbose
("
Stopping timer with pid
$tpid
");
# FIXME as Cygwin reuses pids fast, maybe check that is
# FIXME as Cygwin reuses pids fast, maybe check that is
# the expected process somehow?!
# the expected process somehow?!
...
@@ -114,7 +117,7 @@ sub mtr_timer_stop ($$) {
...
@@ -114,7 +117,7 @@ sub mtr_timer_stop ($$) {
}
}
else
else
{
{
mtr_
debug
("
Asked to stop timer
\"
$name
\"
not started
");
mtr_
error
("
Asked to stop timer
\"
$name
\"
not started
");
return
0
;
return
0
;
}
}
}
}
...
@@ -136,10 +139,8 @@ sub mtr_timer_timeout ($$) {
...
@@ -136,10 +139,8 @@ sub mtr_timer_timeout ($$) {
return
""
unless
exists
$timers
->
{'
pids
'}
->
{
$pid
};
return
""
unless
exists
$timers
->
{'
pids
'}
->
{
$pid
};
# We got a timeout
# We got a timeout, return the name ot the timer
my
$name
=
$timers
->
{'
pids
'}
->
{
$pid
};
return
$timers
->
{'
pids
'}
->
{
$pid
};
mtr_timer_stop
(
$timers
,
$timers
->
{'
timers
'}
->
{
$name
});
return
$name
;
}
}
1
;
1
;
mysql-test/mysql-test-run.pl
View file @
3d42998c
...
@@ -65,6 +65,7 @@ use IO::Socket;
...
@@ -65,6 +65,7 @@ use IO::Socket;
use
IO::Socket::
INET
;
use
IO::Socket::
INET
;
use
Data::
Dumper
;
use
Data::
Dumper
;
use
strict
;
use
strict
;
use
warnings
;
use
diagnostics
;
use
diagnostics
;
our
$glob_win32_perl
=
(
$^O
eq
"
MSWin32
");
# ActiveState Win32 Perl
our
$glob_win32_perl
=
(
$^O
eq
"
MSWin32
");
# ActiveState Win32 Perl
...
@@ -277,7 +278,7 @@ our $opt_skip_ndbcluster= 0;
...
@@ -277,7 +278,7 @@ our $opt_skip_ndbcluster= 0;
our
$opt_skip_ndbcluster_slave
=
0
;
our
$opt_skip_ndbcluster_slave
=
0
;
our
$opt_with_ndbcluster
=
0
;
our
$opt_with_ndbcluster
=
0
;
our
$opt_with_ndbcluster_only
=
0
;
our
$opt_with_ndbcluster_only
=
0
;
our
$
opt
_ndbcluster_supported
=
0
;
our
$
glob
_ndbcluster_supported
=
0
;
our
$opt_ndb_extra_test
=
0
;
our
$opt_ndb_extra_test
=
0
;
our
$opt_skip_master_binlog
=
0
;
our
$opt_skip_master_binlog
=
0
;
our
$opt_skip_slave_binlog
=
0
;
our
$opt_skip_slave_binlog
=
0
;
...
@@ -391,6 +392,8 @@ sub main () {
...
@@ -391,6 +392,8 @@ sub main () {
my
(
$need_ndbcluster
,
$need_im
);
my
(
$need_ndbcluster
,
$need_im
);
foreach
my
$test
(
@$tests
)
foreach
my
$test
(
@$tests
)
{
{
next
if
$test
->
{
skip
};
$need_ndbcluster
||=
$test
->
{
ndb_test
};
$need_ndbcluster
||=
$test
->
{
ndb_test
};
$need_im
||=
$test
->
{
component_id
}
eq
'
im
';
$need_im
||=
$test
->
{
component_id
}
eq
'
im
';
...
@@ -570,10 +573,10 @@ sub command_line_setup () {
...
@@ -570,10 +573,10 @@ sub command_line_setup () {
'
compress
'
=>
\
$opt_compress
,
'
compress
'
=>
\
$opt_compress
,
'
bench
'
=>
\
$opt_bench
,
'
bench
'
=>
\
$opt_bench
,
'
small-bench
'
=>
\
$opt_small_bench
,
'
small-bench
'
=>
\
$opt_small_bench
,
'
with-ndbcluster
'
=>
\
$opt_with_ndbcluster
,
# Control what test suites or cases to run
# Control what test suites or cases to run
'
force
'
=>
\
$opt_force
,
'
force
'
=>
\
$opt_force
,
'
with-ndbcluster
'
=>
\
$opt_with_ndbcluster
,
'
with-ndbcluster-only
'
=>
\
$opt_with_ndbcluster_only
,
'
with-ndbcluster-only
'
=>
\
$opt_with_ndbcluster_only
,
'
skip-ndbcluster|skip-ndb
'
=>
\
$opt_skip_ndbcluster
,
'
skip-ndbcluster|skip-ndb
'
=>
\
$opt_skip_ndbcluster
,
'
skip-ndbcluster-slave|skip-ndb-slave
'
'
skip-ndbcluster-slave|skip-ndb-slave
'
...
@@ -844,9 +847,9 @@ sub command_line_setup () {
...
@@ -844,9 +847,9 @@ sub command_line_setup () {
# --------------------------------------------------------------------------
# --------------------------------------------------------------------------
# Ndb cluster flags
# Ndb cluster flags
# --------------------------------------------------------------------------
# --------------------------------------------------------------------------
if
(
$opt_with_ndbcluster
and
$opt_skip_ndbcluster
)
if
(
$opt_with_ndbcluster
and
!
$opt_bench
)
{
{
mtr_error
("
Can
't specify both --with-ndbcluster and --skip-ndbcluster
");
mtr_error
("
Can
only use --with-ndbcluster togheter with --bench
");
}
}
if
(
$opt_ndbconnectstring
)
if
(
$opt_ndbconnectstring
)
...
@@ -1483,7 +1486,7 @@ sub environment_setup () {
...
@@ -1483,7 +1486,7 @@ sub environment_setup () {
# --------------------------------------------------------------------------
# --------------------------------------------------------------------------
# Add the path where libndbclient can be found
# Add the path where libndbclient can be found
# --------------------------------------------------------------------------
# --------------------------------------------------------------------------
if
(
$
opt
_ndbcluster_supported
)
if
(
$
glob
_ndbcluster_supported
)
{
{
push
(
@ld_library_paths
,
"
$glob_basedir
/storage/ndb/src/.libs
");
push
(
@ld_library_paths
,
"
$glob_basedir
/storage/ndb/src/.libs
");
}
}
...
@@ -1868,6 +1871,8 @@ sub cleanup_stale_files () {
...
@@ -1868,6 +1871,8 @@ sub cleanup_stale_files () {
rmtree
(
readlink
(
$opt_vardir
));
rmtree
(
readlink
(
$opt_vardir
));
# Remove the entire "var" dir
# Remove the entire "var" dir
rmtree
("
$opt_vardir
/
");
rmtree
("
$opt_vardir
/
");
# Remove the "var" symlink
unlink
(
$opt_vardir
);
}
}
else
else
{
{
...
@@ -2040,7 +2045,7 @@ sub check_ndbcluster_support ($) {
...
@@ -2040,7 +2045,7 @@ sub check_ndbcluster_support ($) {
$opt_skip_ndbcluster_slave
=
1
;
$opt_skip_ndbcluster_slave
=
1
;
return
;
return
;
}
}
$
opt
_ndbcluster_supported
=
1
;
$
glob
_ndbcluster_supported
=
1
;
mtr_report
("
Using ndbcluster when necessary, mysqld supports it
");
mtr_report
("
Using ndbcluster when necessary, mysqld supports it
");
if
(
$mysql_version_id
<
50100
)
if
(
$mysql_version_id
<
50100
)
...
@@ -2057,11 +2062,6 @@ sub check_ndbcluster_support ($) {
...
@@ -2057,11 +2062,6 @@ sub check_ndbcluster_support ($) {
sub
ndbcluster_start_install
($)
{
sub
ndbcluster_start_install
($)
{
my
$cluster
=
shift
;
my
$cluster
=
shift
;
if
(
$opt_skip_ndbcluster
or
$glob_use_running_ndbcluster
)
{
return
0
;
}
mtr_report
("
Installing
$cluster
->{'name'} Cluster
");
mtr_report
("
Installing
$cluster
->{'name'} Cluster
");
mkdir
(
$cluster
->
{'
data_dir
'});
mkdir
(
$cluster
->
{'
data_dir
'});
...
@@ -2475,11 +2475,24 @@ sub mysql_install_db () {
...
@@ -2475,11 +2475,24 @@ sub mysql_install_db () {
my
$cluster_started_ok
=
1
;
# Assume it can be started
my
$cluster_started_ok
=
1
;
# Assume it can be started
if
(
ndbcluster_start_install
(
$clusters
->
[
0
])
||
if
(
$opt_skip_ndbcluster
||
$glob_use_running_ndbcluster
)
(
$max_slave_num
&&
!
$opt_skip_ndbcluster_slave
&&
{
ndbcluster_start_install
(
$clusters
->
[
1
])))
# Don't install master cluster
}
elsif
(
ndbcluster_start_install
(
$clusters
->
[
0
]))
{
mtr_warning
("
Failed to start install of
$clusters
->[0]->{name}
");
$cluster_started_ok
=
0
;
}
if
(
$max_slave_num
==
0
||
$opt_skip_ndbcluster_slave
||
$glob_use_running_ndbcluster_slave
)
{
# Don't install slave cluster
}
elsif
(
ndbcluster_start_install
(
$clusters
->
[
1
]))
{
{
mtr_warning
("
Failed to start install of
cluster
");
mtr_warning
("
Failed to start install of
$clusters
->[1]->{name}
");
$cluster_started_ok
=
0
;
$cluster_started_ok
=
0
;
}
}
...
@@ -2512,9 +2525,6 @@ sub mysql_install_db () {
...
@@ -2512,9 +2525,6 @@ sub mysql_install_db () {
}
}
}
}
# Stop clusters...
stop_all_servers
();
return
0
;
return
0
;
}
}
...
@@ -2753,10 +2763,9 @@ sub run_testcase_check_skip_test($)
...
@@ -2753,10 +2763,9 @@ sub run_testcase_check_skip_test($)
# If test needs this cluster, check it was installed ok
# If test needs this cluster, check it was installed ok
if
(
!
$cluster
->
{'
installed_ok
'}
)
if
(
!
$cluster
->
{'
installed_ok
'}
)
{
{
mtr_tofile
(
$path_timefile
,
"
Test marked as failed because
$cluster
->{'name'}
"
.
"
was not installed ok!
");
mtr_report_test_name
(
$tinfo
);
mtr_report_test_name
(
$tinfo
);
$tinfo
->
{
comment
}
=
"
Cluster
$cluster
->{'name'} was not installed ok
";
mtr_report_test_failed
(
$tinfo
);
mtr_report_test_failed
(
$tinfo
);
return
1
;
return
1
;
}
}
...
@@ -2879,10 +2888,8 @@ sub run_testcase ($) {
...
@@ -2879,10 +2888,8 @@ sub run_testcase ($) {
# Can't restart a running server that may be in use
# Can't restart a running server that may be in use
if
(
$glob_use_running_server
)
if
(
$glob_use_running_server
)
{
{
$tinfo
->
{'
skip
'}
=
1
;
$tinfo
->
{'
comment
'}
=
"
Can't restart a running server
";
mtr_report_test_name
(
$tinfo
);
mtr_report_test_name
(
$tinfo
);
$tinfo
->
{
comment
}
=
"
Can't restart a running server
";
mtr_report_test_skipped
(
$tinfo
);
mtr_report_test_skipped
(
$tinfo
);
return
;
return
;
}
}
...
@@ -2906,6 +2913,7 @@ sub run_testcase ($) {
...
@@ -2906,6 +2913,7 @@ sub run_testcase ($) {
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
if
(
$opt_start_and_exit
or
$opt_start_dirty
)
if
(
$opt_start_and_exit
or
$opt_start_dirty
)
{
{
mtr_timer_stop_all
(
$glob_timers
);
mtr_report
("
\n
Servers started, exiting
");
mtr_report
("
\n
Servers started, exiting
");
exit
(
0
);
exit
(
0
);
}
}
...
@@ -2932,16 +2940,16 @@ sub run_testcase ($) {
...
@@ -2932,16 +2940,16 @@ sub run_testcase ($) {
$tinfo
->
{'
timeout
'}
=
1
;
# Mark as timeout
$tinfo
->
{'
timeout
'}
=
1
;
# Mark as timeout
report_failure_and_restart
(
$tinfo
);
report_failure_and_restart
(
$tinfo
);
}
}
elsif
(
$res
==
1
)
{
# Test case failure reported by mysqltest
report_failure_and_restart
(
$tinfo
);
}
else
else
{
{
# Test case failed, if in control mysqltest returns 1
# mysqltest failed, probably crashed
if
(
$res
!=
1
)
$tinfo
->
{
comment
}
=
{
"
mysqltest returned unexpected code
$res
, it has probably crashed
";
mtr_tofile
(
$path_timefile
,
"
mysqltest returned unexpected code
$res
,
"
.
"
it has probably crashed
");
}
report_failure_and_restart
(
$tinfo
);
report_failure_and_restart
(
$tinfo
);
}
}
...
@@ -3593,14 +3601,14 @@ sub run_testcase_need_master_restart($)
...
@@ -3593,14 +3601,14 @@ sub run_testcase_need_master_restart($)
mtr_verbose
("
Restart master: Restart forced with --force-restart
");
mtr_verbose
("
Restart master: Restart forced with --force-restart
");
}
}
elsif
(
!
$opt_skip_ndbcluster
and
elsif
(
!
$opt_skip_ndbcluster
and
$tinfo
->
{'
ndb_test
'}
==
0
and
!
$tinfo
->
{'
ndb_test
'}
and
$clusters
->
[
0
]
->
{'
pid
'}
!=
0
)
$clusters
->
[
0
]
->
{'
pid
'}
!=
0
)
{
{
$do_restart
=
1
;
# Restart without cluster
$do_restart
=
1
;
# Restart without cluster
mtr_verbose
("
Restart master: Test does not need cluster
");
mtr_verbose
("
Restart master: Test does not need cluster
");
}
}
elsif
(
!
$opt_skip_ndbcluster
and
elsif
(
!
$opt_skip_ndbcluster
and
$tinfo
->
{'
ndb_test
'}
==
1
and
$tinfo
->
{'
ndb_test
'}
and
$clusters
->
[
0
]
->
{'
pid
'}
==
0
)
$clusters
->
[
0
]
->
{'
pid
'}
==
0
)
{
{
$do_restart
=
1
;
# Restart with cluster
$do_restart
=
1
;
# Restart with cluster
...
@@ -4456,6 +4464,7 @@ Options to control what engine/variation to run
...
@@ -4456,6 +4464,7 @@ Options to control what engine/variation to run
skip-ssl Dont start server with support for ssl connections
skip-ssl Dont start server with support for ssl connections
bench Run the benchmark suite
bench Run the benchmark suite
small-bench Run the benchmarks with --small-tests --small-tables
small-bench Run the benchmarks with --small-tests --small-tables
with-ndbcluster Use cluster as default table type for benchmark
Options to control directories to use
Options to control directories to use
benchdir=DIR The directory where the benchmark suite is stored
benchdir=DIR The directory where the benchmark suite is stored
...
@@ -4472,7 +4481,6 @@ Options to control directories to use
...
@@ -4472,7 +4481,6 @@ Options to control directories to use
Options to control what test suites or cases to run
Options to control what test suites or cases to run
force Continue to run the suite after failure
force Continue to run the suite after failure
with-ndbcluster Use cluster in all tests
with-ndbcluster-only Run only tests that include "ndb" in the filename
with-ndbcluster-only Run only tests that include "ndb" in the filename
skip-ndb[cluster] Skip all tests that need cluster
skip-ndb[cluster] Skip all tests that need cluster
skip-ndb[cluster]-slave Skip all tests that need a slave cluster
skip-ndb[cluster]-slave Skip all tests that need a slave cluster
...
...
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