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
a264a79e
Commit
a264a79e
authored
Mar 11, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge
mysql-test/lib/mtr_cases.pl: Auto merged
parents
4ff0d1b6
f15f85bb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
90 additions
and
10 deletions
+90
-10
mysql-test/lib/mtr_cases.pl
mysql-test/lib/mtr_cases.pl
+15
-2
mysql-test/lib/mtr_misc.pl
mysql-test/lib/mtr_misc.pl
+42
-0
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+33
-8
No files found.
mysql-test/lib/mtr_cases.pl
View file @
a264a79e
...
...
@@ -155,11 +155,24 @@ sub collect_test_cases ($) {
if
(
$::opt_reorder
)
{
@$cases
=
sort
{
if
(
$a
->
{'
master_restart
'}
and
$b
->
{'
master_restart
'}
or
!
$a
->
{'
master_restart
'}
and
!
$b
->
{'
master_restart
'}
)
if
(
!
$a
->
{'
master_restart
'}
and
!
$b
->
{'
master_restart
'}
)
{
return
$a
->
{'
name
'}
cmp
$b
->
{'
name
'};
}
if
(
$a
->
{'
master_restart
'}
and
$b
->
{'
master_restart
'}
)
{
my
$cmp
=
mtr_cmp_opts
(
$a
->
{'
master_opt
'},
$b
->
{'
master_opt
'});
if
(
$cmp
==
0
)
{
return
$a
->
{'
name
'}
cmp
$b
->
{'
name
'};
}
else
{
return
$cmp
;
}
}
if
(
$a
->
{'
master_restart
'}
)
{
return
1
;
# Is greater
...
...
mysql-test/lib/mtr_misc.pl
View file @
a264a79e
...
...
@@ -13,6 +13,9 @@ sub mtr_add_arg ($$@);
sub
mtr_path_exists
(@);
sub
mtr_script_exists
(@);
sub
mtr_exe_exists
(@);
sub
mtr_copy_dir
($$);
sub
mtr_same_opts
($$);
sub
mtr_cmp_opts
($$);
##############################################################################
#
...
...
@@ -108,5 +111,44 @@ sub mtr_exe_exists (@) {
}
}
sub
mtr_copy_dir
($$)
{
my
$srcdir
=
shift
;
my
$dstdir
=
shift
;
# Create destination directory
mkpath
(
$dstdir
);
find
(
\&
mtr_copy_one_file
,
$dstdir
);
}
sub
mtr_copy_one_file
{
print
$
File::Find::
name
,
"
\n
";
}
sub
mtr_same_opts
($$)
{
my
$l1
=
shift
;
my
$l2
=
shift
;
return
mtr_cmp_opts
(
$l1
,
$l2
)
==
0
;
}
sub
mtr_cmp_opts
($$)
{
my
$l1
=
shift
;
my
$l2
=
shift
;
my
@l1
=
@$l1
;
my
@l2
=
@$l2
;
return
-
1
if
@l1
<
@l2
;
return
1
if
@l1
>
@l2
;
while
(
@l1
)
# Same length
{
my
$e1
=
shift
@l1
;
my
$e2
=
shift
@l2
;
my
$cmp
=
(
$e1
cmp
$e2
);
return
$cmp
if
$cmp
!=
0
;
}
return
0
;
# They are the same
}
1
;
mysql-test/mysql-test-run.pl
View file @
a264a79e
...
...
@@ -481,9 +481,9 @@ sub initial_setup () {
if
(
$glob_cygwin_perl
)
{
# Windows programs like 'mysqld' needs Windows paths
$glob_mysql_test_dir
=
`
cygpath -m
$glob_mysql_test_dir
`;
$glob_mysql_test_dir
=
`
cygpath -m
"
$glob_mysql_test_dir
"
`;
my
$shell
=
$ENV
{'
SHELL
'}
||
"
/bin/bash
";
$glob_cygwin_shell
=
`
cygpath -w
$shell
`;
# The Windows path c:\...
$glob_cygwin_shell
=
`
cygpath -w
"
$shell
"
`;
# The Windows path c:\...
chomp
(
$glob_mysql_test_dir
);
chomp
(
$glob_cygwin_shell
);
}
...
...
@@ -2031,13 +2031,37 @@ sub run_testcase ($) {
if
(
!
$glob_use_running_server
and
!
$glob_use_embedded_server
)
{
if
(
$tinfo
->
{'
master_restart
'}
or
$master
->
[
0
]
->
{'
running_master_is_special
'}
or
# Stop if cluster is started but test cases does not need cluster
(
$opt_with_ndbcluster
&&
$tinfo
->
{'
ndb_test
'}
!=
$using_ndbcluster_master
)
)
# We try to find out if we are to restart the server
my
$do_restart
=
0
;
# Assumes we don't have to
if
(
$tinfo
->
{'
master_sh
'}
)
{
$do_restart
=
1
;
# Always restart if script to run
}
elsif
(
$opt_with_ndbcluster
and
$tinfo
->
{'
ndb_test
'}
!=
$using_ndbcluster_master
)
{
$do_restart
=
1
;
# Restart without cluster
}
elsif
(
$master
->
[
0
]
->
{'
running_master_is_special
'}
and
$master
->
[
0
]
->
{'
running_master_is_special
'}
->
{'
timezone
'}
eq
$tinfo
->
{'
timezone
'}
and
mtr_same_opts
(
$master
->
[
0
]
->
{'
running_master_is_special
'}
->
{'
master_opt
'},
$tinfo
->
{'
master_opt
'})
)
{
# If running master was started with special settings, but
# the current test requuires the same ones, we *don't* restart.
$do_restart
=
0
;
}
elsif
(
$tinfo
->
{'
master_restart
'}
or
$master
->
[
0
]
->
{'
running_master_is_special
'}
)
{
$do_restart
=
1
;
}
if
(
$do_restart
)
{
stop_masters
();
$master
->
[
0
]
->
{'
running_master_is_special
'}
=
0
;
# Forget why we stopped
delete
$master
->
[
0
]
->
{'
running_master_is_special
'};
# Forget history
}
# ----------------------------------------------------------------------
...
...
@@ -2129,7 +2153,8 @@ sub run_testcase ($) {
if
(
$tinfo
->
{'
master_restart
'}
)
{
$master
->
[
0
]
->
{'
running_master_is_special
'}
=
1
;
# Save this test case information, so next can examine it
$master
->
[
0
]
->
{'
running_master_is_special
'}
=
$tinfo
;
}
}
elsif
(
!
$opt_skip_im
and
$tinfo
->
{'
component_id
'}
eq
'
im
'
)
...
...
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