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
3796d78e
Commit
3796d78e
authored
Feb 17, 2010
by
Bjorn Munch
Browse files
Options
Browse Files
Download
Plain Diff
merge 44054
parents
53411abc
584a6e74
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
15 deletions
+24
-15
mysql-test/lib/mtr_cases.pm
mysql-test/lib/mtr_cases.pm
+18
-10
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+6
-5
No files found.
mysql-test/lib/mtr_cases.pm
View file @
3796d78e
...
@@ -40,7 +40,6 @@ our $default_storage_engine;
...
@@ -40,7 +40,6 @@ our $default_storage_engine;
our
$opt_with_ndbcluster_only
;
our
$opt_with_ndbcluster_only
;
our
$defaults_file
;
our
$defaults_file
;
our
$defaults_extra_file
;
our
$defaults_extra_file
;
our
$reorder
=
1
;
our
$quick_collect
;
our
$quick_collect
;
sub
collect_option
{
sub
collect_option
{
...
@@ -99,7 +98,8 @@ sub init_pattern {
...
@@ -99,7 +98,8 @@ sub init_pattern {
#
#
##############################################################################
##############################################################################
sub
collect_test_cases
($$)
{
sub
collect_test_cases
($$$)
{
my
$opt_reorder
=
shift
;
# True if we're reordering tests
my
$suites
=
shift
;
# Semicolon separated list of test suites
my
$suites
=
shift
;
# Semicolon separated list of test suites
my
$opt_cases
=
shift
;
my
$opt_cases
=
shift
;
my
$cases
=
[]
;
# Array of hash(one hash for each testcase)
my
$cases
=
[]
;
# Array of hash(one hash for each testcase)
...
@@ -118,11 +118,17 @@ sub collect_test_cases ($$) {
...
@@ -118,11 +118,17 @@ sub collect_test_cases ($$) {
!
(
IS_WINDOWS
&&
$::opt_embedded_server
)
&&
!
(
IS_WINDOWS
&&
$::opt_embedded_server
)
&&
$lib_innodb_plugin
);
$lib_innodb_plugin
);
# If not reordering, we also shouldn't group by suites, unless
# no test cases were named.
# This also effects some logic in the loop following this.
if
(
$opt_reorder
or
!
@$opt_cases
)
{
foreach
my
$suite
(
split
("
,
",
$suites
))
foreach
my
$suite
(
split
("
,
",
$suites
))
{
{
push
(
@$cases
,
collect_one_suite
(
$suite
,
$opt_cases
));
push
(
@$cases
,
collect_one_suite
(
$suite
,
$opt_cases
));
last
if
$some_test_found
;
last
if
$some_test_found
;
}
}
}
if
(
@$opt_cases
)
if
(
@$opt_cases
)
{
{
...
@@ -135,6 +141,7 @@ sub collect_test_cases ($$) {
...
@@ -135,6 +141,7 @@ sub collect_test_cases ($$) {
my
(
$sname
,
$tname
,
$extension
)
=
split_testname
(
$test_name_spec
);
my
(
$sname
,
$tname
,
$extension
)
=
split_testname
(
$test_name_spec
);
foreach
my
$test
(
@$cases
)
foreach
my
$test
(
@$cases
)
{
{
last
unless
$opt_reorder
;
# test->{name} is always in suite.name format
# test->{name} is always in suite.name format
if
(
$test
->
{
name
}
=~
/.*\.$tname/
)
if
(
$test
->
{
name
}
=~
/.*\.$tname/
)
{
{
...
@@ -144,12 +151,13 @@ sub collect_test_cases ($$) {
...
@@ -144,12 +151,13 @@ sub collect_test_cases ($$) {
}
}
if
(
not
$found
)
if
(
not
$found
)
{
{
$sname
=
"
main
"
if
!
$opt_reorder
and
!
$sname
;
mtr_error
("
Could not find '
$tname
' in '
$suites
' suite(s)
")
unless
$sname
;
mtr_error
("
Could not find '
$tname
' in '
$suites
' suite(s)
")
unless
$sname
;
# If suite was part of name, find it there
# If suite was part of name, find it there
, may come with combinations
my
(
$this_case
)
=
collect_one_suite
(
$sname
,
[
$tname
]);
my
@this_case
=
collect_one_suite
(
$sname
,
[
$tname
]);
if
(
$
this_case
)
if
(
@
this_case
)
{
{
push
(
@$cases
,
$
this_case
);
push
(
@$cases
,
@
this_case
);
}
}
else
else
{
{
...
@@ -159,7 +167,7 @@ sub collect_test_cases ($$) {
...
@@ -159,7 +167,7 @@ sub collect_test_cases ($$) {
}
}
}
}
if
(
$reorder
&&
!
$quick_collect
)
if
(
$
opt_
reorder
&&
!
$quick_collect
)
{
{
# Reorder the test cases in an order that will make them faster to run
# Reorder the test cases in an order that will make them faster to run
my
%
sort_criteria
;
my
%
sort_criteria
;
...
...
mysql-test/mysql-test-run.pl
View file @
3796d78e
...
@@ -239,6 +239,7 @@ my $opt_wait_all;
...
@@ -239,6 +239,7 @@ my $opt_wait_all;
my
$opt_repeat
=
1
;
my
$opt_repeat
=
1
;
my
$opt_retry
=
3
;
my
$opt_retry
=
3
;
my
$opt_retry_failure
=
env_or_val
(
MTR_RETRY_FAILURE
=>
2
);
my
$opt_retry_failure
=
env_or_val
(
MTR_RETRY_FAILURE
=>
2
);
my
$opt_reorder
=
1
;
my
$opt_strace_client
;
my
$opt_strace_client
;
...
@@ -323,7 +324,7 @@ sub main {
...
@@ -323,7 +324,7 @@ sub main {
}
}
mtr_report
("
Collecting tests...
");
mtr_report
("
Collecting tests...
");
my
$tests
=
collect_test_cases
(
$opt_suites
,
\
@opt_cases
);
my
$tests
=
collect_test_cases
(
$opt_
reorder
,
$opt_
suites
,
\
@opt_cases
);
if
(
$opt_report_features
)
{
if
(
$opt_report_features
)
{
# Put "report features" as the first test to run
# Put "report features" as the first test to run
...
@@ -646,9 +647,9 @@ sub run_test_server ($$$) {
...
@@ -646,9 +647,9 @@ sub run_test_server ($$$) {
next
;
next
;
}
}
# Prefer same configuration
# Prefer same configuration
, or just use next if --noreorder
if
(
defined
$result
and
if
(
!
$opt_reorder
or
(
defined
$result
and
$result
->
{
template_path
}
eq
$t
->
{
template_path
})
$result
->
{
template_path
}
eq
$t
->
{
template_path
})
)
{
{
#mtr_report("Test uses same config => good match");
#mtr_report("Test uses same config => good match");
# Test uses same config => good match
# Test uses same config => good match
...
@@ -919,7 +920,7 @@ sub command_line_setup {
...
@@ -919,7 +920,7 @@ sub command_line_setup {
'
report-features
'
=>
\
$opt_report_features
,
'
report-features
'
=>
\
$opt_report_features
,
'
comment=s
'
=>
\
$opt_comment
,
'
comment=s
'
=>
\
$opt_comment
,
'
fast
'
=>
\
$opt_fast
,
'
fast
'
=>
\
$opt_fast
,
'
reorder!
'
=>
\
&
collect_option
,
'
reorder!
'
=>
\
$opt_reorder
,
'
enable-disabled
'
=>
\&
collect_option
,
'
enable-disabled
'
=>
\&
collect_option
,
'
verbose+
'
=>
\
$opt_verbose
,
'
verbose+
'
=>
\
$opt_verbose
,
'
verbose-restart
'
=>
\&
report_option
,
'
verbose-restart
'
=>
\&
report_option
,
...
...
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