1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

mtr_timer.pl, mysql-test-run.pl, mtr_report.pl, mtr_process.pl:

Added suite and test case timeout
mtr_timer.pl:
  new file


mysql-test/lib/mtr_process.pl:
  Added suite and test case timeout
mysql-test/lib/mtr_report.pl:
  Added suite and test case timeout
mysql-test/mysql-test-run.pl:
  Added suite and test case timeout
mysql-test/lib/mtr_timer.pl:
  Added suite and test case timeout
This commit is contained in:
unknown
2005-08-18 00:16:44 +02:00
parent 085c8d3042
commit d1bdd18eb4
4 changed files with 180 additions and 5 deletions

View File

@ -210,6 +210,7 @@ sub spawn_parent_impl {
# normally from running a test case?
my $exit_value= -1;
my $saved_exit_value;
my $ret_pid; # What waitpid() returns
while ( ($ret_pid= waitpid(-1,0)) != -1 )
@ -219,6 +220,24 @@ sub spawn_parent_impl {
# but not $exit_value, this is flagged from
#
my $timer_name= mtr_timer_timeout($::glob_timers, $ret_pid);
if ( $timer_name )
{
if ( $timer_name eq "suite" )
{
# We give up here
# FIXME we should only give up the suite, not all of the run?
print STDERR "\n";
mtr_error("Test suite timeout");
}
elsif ( $timer_name eq "testcase" )
{
$saved_exit_value= 63; # Mark as timeout
kill(9, $pid); # Kill mysqltest
next; # Go on and catch the termination
}
}
if ( $ret_pid == $pid )
{
# We got termination of mysqltest, we are done
@ -270,7 +289,7 @@ sub spawn_parent_impl {
}
}
return $exit_value;
return $saved_exit_value || $exit_value;
}
}
else