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
9404bbc3
Commit
9404bbc3
authored
Sep 24, 2009
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
824c6d1c
a4a6f1d5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
0 deletions
+44
-0
mysql-test/lib/mtr_misc.pl
mysql-test/lib/mtr_misc.pl
+20
-0
mysql-test/mysql-test-run.pl
mysql-test/mysql-test-run.pl
+24
-0
No files found.
mysql-test/lib/mtr_misc.pl
View file @
9404bbc3
...
...
@@ -174,4 +174,24 @@ sub mtr_milli_sleep {
select
(
undef
,
undef
,
undef
,
(
$millis
/
1000
));
}
sub
mtr_wait_lock_file
{
die
"
usage: mtr_wait_lock_file(path_to_file, keep_alive)
"
unless
@_
==
2
;
my
(
$file
,
$keep_alive
)
=
@_
;
my
$waited
=
0
;
my
$msg_counter
=
$keep_alive
;
while
(
-
e
$file
)
{
if
(
$keep_alive
&&
!
$msg_counter
)
{
print
"
\n
-STOPPED- [pass]
"
.
$keep_alive
.
"
\n
";
$msg_counter
=
$keep_alive
;
}
mtr_milli_sleep
(
1000
);
$waited
=
1
;
$msg_counter
--
;
}
return
(
$waited
);
}
1
;
mysql-test/mysql-test-run.pl
View file @
9404bbc3
...
...
@@ -253,6 +253,11 @@ my $opt_max_test_fail= $ENV{MTR_MAX_TEST_FAIL} || 10;
my
$opt_parallel
=
$ENV
{
MTR_PARALLEL
}
||
1
;
# lock file to stop tests
my
$opt_stop_file
=
$ENV
{
MTR_STOP_FILE
};
# print messages when test suite is stopped (for buildbot)
my
$opt_stop_keep_alive
=
$ENV
{
MTR_STOP_KEEP_ALIVE
};
select
(
STDOUT
);
$|
=
1
;
# Automatically flush STDOUT
...
...
@@ -451,6 +456,15 @@ sub run_test_server ($$$) {
my
$s
=
IO::
Select
->
new
();
$s
->
add
(
$server
);
while
(
1
)
{
if
(
$opt_stop_file
)
{
if
(
mtr_wait_lock_file
(
$opt_stop_file
,
$opt_stop_keep_alive
))
{
# We were waiting so restart timer process
$suite_timeout_proc
->
kill
();
$suite_timeout_proc
=
My::
SafeProcess
->
timer
(
suite_timeout
());
}
}
my
@ready
=
$s
->
can_read
(
1
);
# Wake up once every second
foreach
my
$sock
(
@ready
)
{
if
(
$sock
==
$server
)
{
...
...
@@ -933,6 +947,8 @@ sub command_line_setup {
'
warnings!
'
=>
\
$opt_warnings
,
'
timestamp
'
=>
\&
report_option
,
'
timediff
'
=>
\&
report_option
,
'
stop-file=s
'
=>
\
$opt_stop_file
,
'
stop-keep-alive=i
'
=>
\
$opt_stop_keep_alive
,
'
help|h
'
=>
\
$opt_usage
,
'
list-options
'
=>
\
$opt_list_options
,
...
...
@@ -5409,6 +5425,14 @@ Misc options
warnings Scan the log files for warnings. Use --nowarnings
to turn off.
stop-file=file (also MTR_STOP_FILE environment variable) if this
file detected mysql test will not start new tests
until the file will be removed.
stop-keep-alive=sec (also MTR_STOP_KEEP_ALIVE environment variable)
works with stop-file, print messages every sec
seconds when mysql test is waiting to removing
the file (for buildbot)
sleep=SECONDS Passed to mysqltest, will be used as fixed sleep time
debug-sync-timeout=NUM Set default timeout for WAIT_FOR debug sync
actions. Disable facility with NUM=0.
...
...
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