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
61ef715e
Commit
61ef715e
authored
Mar 21, 2005
by
kent@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/Users/kent/mysql/bk/mysql-4.1-build
into mysql.com:/Users/kent/mysql/bk/mysql-4.1-perl
parents
a34ee2c9
c3fa95d4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
30 deletions
+44
-30
mysql-test/lib/mtr_cases.pl
mysql-test/lib/mtr_cases.pl
+18
-15
mysql-test/lib/mtr_report.pl
mysql-test/lib/mtr_report.pl
+5
-6
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+21
-9
No files found.
mysql-test/lib/mtr_cases.pl
View file @
61ef715e
...
...
@@ -63,21 +63,24 @@ sub collect_test_cases ($) {
# To speed things up, we sort first in if the test require a restart
# or not, second in alphanumeric order.
# @$cases = sort {
# if ( $a->{'master_restart'} and $b->{'master_restart'} or
# ! $a->{'master_restart'} and ! $b->{'master_restart'} )
# {
# return $a->{'name'} cmp $b->{'name'};
# }
# if ( $a->{'master_restart'} )
# {
# return 1; # Is greater
# }
# else
# {
# return -1; # Is less
# }
# } @$cases;
if
(
$::opt_reorder
)
{
@$cases
=
sort
{
if
(
$a
->
{'
master_restart
'}
and
$b
->
{'
master_restart
'}
or
!
$a
->
{'
master_restart
'}
and
!
$b
->
{'
master_restart
'}
)
{
return
$a
->
{'
name
'}
cmp
$b
->
{'
name
'};
}
if
(
$a
->
{'
master_restart
'}
)
{
return
1
;
# Is greater
}
else
{
return
-
1
;
# Is less
}
}
@$cases
;
}
return
$cases
;
}
...
...
mysql-test/lib/mtr_report.pl
View file @
61ef715e
...
...
@@ -89,12 +89,11 @@ sub mtr_report_test_passed ($) {
my
$tinfo
=
shift
;
my
$timer
=
"";
# FIXME
# if ( $::opt_timer and -f "$::glob_mysql_test_dir/var/log/timer" )
# {
# $timer= `cat var/log/timer`;
# $timer= sprintf "%13s", $timer;
# }
if
(
$::opt_timer
and
-
f
"
$::glob_mysql_test_dir/var/log/timer
"
)
{
$timer
=
mtr_fromfile
("
$::glob_mysql_test_dir/var/log/timer
");
$timer
=
sprintf
"
%12s
",
$timer
;
}
$tinfo
->
{'
result
'}
=
'
MTR_RES_PASSED
';
print
"
[ pass ]
$timer
\n
";
}
...
...
mysql-test/mysql-test-run.pl
View file @
61ef715e
...
...
@@ -214,6 +214,7 @@ our $opt_embedded_server;
our
$opt_extern
;
our
$opt_fast
;
our
$opt_force
;
our
$opt_reorder
;
our
$opt_gcov
;
our
$opt_gcov_err
;
...
...
@@ -525,6 +526,7 @@ sub command_line_setup () {
'
local-master
'
=>
\
$opt_local_master
,
'
netware
'
=>
\
$opt_netware
,
'
old-master
'
=>
\
$opt_old_master
,
'
reorder
'
=>
\
$opt_reorder
,
'
script-debug
'
=>
\
$opt_script_debug
,
'
sleep=i
'
=>
\
$opt_sleep
,
'
socket=s
'
=>
\
$opt_socket
,
...
...
@@ -1368,7 +1370,10 @@ sub run_testcase ($) {
mtr_report_test_name
(
$tinfo
);
mtr_tofile
(
$master
->
[
0
]
->
{'
path_myerr
'},"
CURRENT_TEST:
$tname
\n
");
do_before_start_master
(
$tname
,
$tinfo
->
{'
master_sh
'});
# FIXME test cases that depend on each other, prevent this from
# being at this location.
# do_before_start_master($tname,$tinfo->{'master_sh'});
# ----------------------------------------------------------------------
# If any mysqld servers running died, we have to know
...
...
@@ -1400,6 +1405,8 @@ sub run_testcase ($) {
}
if
(
!
$master
->
[
0
]
->
{'
pid
'}
)
{
# FIXME not correct location for do_before_start_master()
do_before_start_master
(
$tname
,
$tinfo
->
{'
master_sh
'});
$master
->
[
0
]
->
{'
pid
'}
=
mysqld_start
('
master
',
0
,
$tinfo
->
{'
master_opt
'},
[]
);
if
(
!
$master
->
[
0
]
->
{'
pid
'}
)
...
...
@@ -1535,9 +1542,10 @@ sub do_before_start_master ($$) {
$tname
ne
"
rpl_crash_binlog_ib_3b
")
{
# FIXME we really want separate dir for binlogs
# FIXME replace 'rm' in backticks with portable Perl function
`
rm -f
$glob_mysql_test_dir
/var/log/master-bin*
`;
# unlink("$glob_mysql_test_dir/var/log/master-bin*");
foreach
my
$bin
(
glob
("
$glob_mysql_test_dir
/var/log/master*-bin.*
")
)
{
unlink
(
$bin
);
}
}
# Remove old master.info and relay-log.info files
...
...
@@ -1571,9 +1579,10 @@ sub do_before_start_slave ($$) {
$tname
ne
"
rpl_crash_binlog_ib_3b
"
)
{
# FIXME we really want separate dir for binlogs
# FIXME replace 'rm' in backticks with portable Perl function
`
rm -fr
$glob_mysql_test_dir
/var/log/slave*-bin.*
`;
# unlink("$glob_mysql_test_dir/var/log/slave*-bin.*"); # FIXME idx???
foreach
my
$bin
(
glob
("
$glob_mysql_test_dir
/var/log/slave*-bin.*
")
)
{
unlink
(
$bin
);
}
# FIXME really master?!
unlink
("
$glob_mysql_test_dir
/var/slave-data/master.info
");
unlink
("
$glob_mysql_test_dir
/var/slave-data/relay-log.info
");
...
...
@@ -1659,13 +1668,15 @@ sub mysqld_arguments ($$$$$) {
mtr_add_arg
(
$args
,
"
%s--datadir=%s
",
$prefix
,
$slave
->
[
$idx
]
->
{'
path_myddir
'});
%
FIXME
slave
get
this
option
twice
?
!
mtr_add_arg
(
$args
,
"
%s--exit-info=256
",
$prefix
);
mtr_add_arg
(
$args
,
"
%s--init-rpl-role=slave
",
$prefix
);
mtr_add_arg
(
$args
,
"
%s--log-bin=%s/var/log/slave%s-bin
",
$prefix
,
$glob_mysql_test_dir
,
$sidx
);
# FIXME use own dir for binlogs
mtr_add_arg
(
$args
,
"
%s--log-slave-updates
",
$prefix
);
%
FIXME
option
duplicated
for
slave
mtr_add_arg
(
$args
,
"
%s--log=%s
",
$prefix
,
$slave
->
[
$idx
]
->
{'
path_my
err
'});
$slave
->
[
$idx
]
->
{'
path_my
log
'});
mtr_add_arg
(
$args
,
"
%s--master-retry-count=10
",
$prefix
);
mtr_add_arg
(
$args
,
"
%s--pid-file=%s
",
$prefix
,
$slave
->
[
$idx
]
->
{'
path_mypid
'});
...
...
@@ -2046,7 +2057,7 @@ sub run_mysqltest ($$) {
if
(
$opt_timer
)
{
mtr_add_arg
(
$args
,
"
--timer-file=
var/log/timer
"
);
mtr_add_arg
(
$args
,
"
--timer-file=
%s/var/log/timer
",
$glob_mysql_test_dir
);
}
if
(
$opt_big_test
)
...
...
@@ -2175,6 +2186,7 @@ Misc options
timer Show test case execution time
start-and-exit Only initiate and start the "mysqld" servers
fast Don't try to cleanup from earlier runs
reorder Reorder tests to get less server restarts
help Get this help text
unified-diff | udiff When presenting differences, use unified diff
...
...
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