diff options
author | unknown <kent@mysql.com> | 2005-08-18 00:16:44 +0200 |
---|---|---|
committer | unknown <kent@mysql.com> | 2005-08-18 00:16:44 +0200 |
commit | d1bdd18eb469dd0c731e2a3478e30da01d764afd (patch) | |
tree | dd0a9f1002d51633bf23fbae8b229b6929aa53bd /mysql-test/lib/mtr_process.pl | |
parent | 085c8d30425b60ee87ae25fd332b88eb1ba7d03b (diff) | |
download | mariadb-git-d1bdd18eb469dd0c731e2a3478e30da01d764afd.tar.gz |
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
Diffstat (limited to 'mysql-test/lib/mtr_process.pl')
-rw-r--r-- | mysql-test/lib/mtr_process.pl | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/mysql-test/lib/mtr_process.pl b/mysql-test/lib/mtr_process.pl index ec12bc3907c..c9ae92305c2 100644 --- a/mysql-test/lib/mtr_process.pl +++ b/mysql-test/lib/mtr_process.pl @@ -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 |