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
93b81563
Commit
93b81563
authored
Aug 30, 2010
by
Bjorn Munch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug #55178 Set timeout on test-to-test-basis
Allow --testcase-timeout=<mins> to be set in .opt file for test
parent
09c62e4f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
4 deletions
+21
-4
mysql-test/lib/mtr_cases.pm
mysql-test/lib/mtr_cases.pm
+7
-0
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+14
-4
No files found.
mysql-test/lib/mtr_cases.pm
View file @
93b81563
...
...
@@ -684,6 +684,13 @@ sub process_opts_file {
next
;
}
$value
=
mtr_match_prefix
(
$opt
,
"
--testcase-timeout=
");
if
(
defined
$value
)
{
# Overrides test case timeout for this test
$tinfo
->
{'
case-timeout
'}
=
$value
;
next
;
}
# Ok, this was a real option, add it
push
(
@
{
$tinfo
->
{
$opt_name
}},
$opt
);
}
...
...
mysql-test/mysql-test-run.pl
View file @
93b81563
...
...
@@ -212,7 +212,6 @@ my $opt_suite_timeout = $ENV{MTR_SUITE_TIMEOUT} || 300; # minutes
my
$opt_shutdown_timeout
=
$ENV
{
MTR_SHUTDOWN_TIMEOUT
}
||
10
;
# seconds
my
$opt_start_timeout
=
$ENV
{
MTR_START_TIMEOUT
}
||
180
;
# seconds
sub
testcase_timeout
{
return
$opt_testcase_timeout
*
60
;
};
sub
suite_timeout
{
return
$opt_suite_timeout
*
60
;
};
sub
check_timeout
{
return
$opt_testcase_timeout
*
6
;
};
...
...
@@ -241,6 +240,17 @@ my $opt_callgrind;
my
%
mysqld_logs
;
my
$opt_debug_sync_timeout
=
300
;
# Default timeout for WAIT_FOR actions.
sub
testcase_timeout
($)
{
my
(
$tinfo
)
=
@_
;
if
(
exists
$tinfo
->
{'
case-timeout
'})
{
# Return test specific timeout if *longer* that the general timeout
my
$test_to
=
$tinfo
->
{'
case-timeout
'};
$test_to
*=
10
if
$opt_valgrind
;
return
$test_to
*
60
if
$test_to
>
$opt_testcase_timeout
;
}
return
$opt_testcase_timeout
*
60
;
}
our
$opt_warnings
=
1
;
our
$opt_skip_ndbcluster
=
0
;
...
...
@@ -3469,7 +3479,7 @@ sub run_testcase ($) {
}
}
my
$test_timeout
=
start_timer
(
testcase_timeout
());
my
$test_timeout
=
start_timer
(
testcase_timeout
(
$tinfo
));
do_before_run_mysqltest
(
$tinfo
);
...
...
@@ -3669,7 +3679,7 @@ sub run_testcase ($) {
{
my
$log_file_name
=
$opt_vardir
.
"
/log/
"
.
$tinfo
->
{
shortname
}
.
"
.log
";
$tinfo
->
{
comment
}
=
"
Test case timeout after
"
.
testcase_timeout
()
.
"
Test case timeout after
"
.
testcase_timeout
(
$tinfo
)
.
"
seconds
\n\n
";
# Add 20 last executed commands from test case log file
if
(
-
e
$log_file_name
)
...
...
@@ -3678,7 +3688,7 @@ sub run_testcase ($) {
"
==
$log_file_name
==
\n
"
.
mtr_lastlinesfromfile
(
$log_file_name
,
20
)
.
"
\n
";
}
$tinfo
->
{'
timeout
'}
=
testcase_timeout
();
# Mark as timeout
$tinfo
->
{'
timeout
'}
=
testcase_timeout
(
$tinfo
);
# Mark as timeout
run_on_all
(
$tinfo
,
'
analyze-timeout
');
report_failure_and_restart
(
$tinfo
);
...
...
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