summaryrefslogtreecommitdiff
path: root/mysql-test/mysql-test-run.pl
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-05-07 13:05:09 +0200
committerSergei Golubchik <sergii@pisem.net>2013-05-07 13:05:09 +0200
commitb381cf843c841151f96541b19bd753cd3bbae326 (patch)
treedfc377a1dfbd4d2044a0b799ff5ed6411c7e864f /mysql-test/mysql-test-run.pl
parentd4be9e7bc0cfd5ddd444ecc64daa4166597ca2eb (diff)
parente5055e22f1f311fa48457cfcc97b72e93a37329f (diff)
downloadmariadb-git-b381cf843c841151f96541b19bd753cd3bbae326.tar.gz
mysql-5.5.31 merge
Diffstat (limited to 'mysql-test/mysql-test-run.pl')
-rwxr-xr-xmysql-test/mysql-test-run.pl27
1 files changed, 23 insertions, 4 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 67f3a3163d8..ee2978e0a32 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -736,9 +736,11 @@ sub run_test_server ($$$) {
mtr_report("\nRetrying test $tname, ".
"attempt($retries/$opt_retry)...\n");
#saving the log file as filename.failed in case of retry
- my $worker_logdir= $result->{savedir};
- my $log_file_name=dirname($worker_logdir)."/".$result->{shortname}.".log";
- rename $log_file_name,$log_file_name.".failed";
+ if ( $result->is_failed() ) {
+ my $worker_logdir= $result->{savedir};
+ my $log_file_name=dirname($worker_logdir)."/".$result->{shortname}.".log";
+ rename $log_file_name,$log_file_name.".failed";
+ }
delete($result->{result});
$result->{retries}= $retries+1;
$result->write_test($sock, 'TESTCASE');
@@ -4140,6 +4142,7 @@ sub resfile_report_test ($) {
sub run_testcase ($$) {
my ($tinfo, $server_socket)= @_;
+ my $print_freq=20;
mtr_verbose("Running test:", $tinfo->{name});
resfile_report_test($tinfo) if $opt_resfile;
@@ -4323,6 +4326,7 @@ sub run_testcase ($$) {
my $test= $tinfo->{suite}->start_test($tinfo);
# Set only when we have to keep waiting after expectedly died server
my $keep_waiting_proc = 0;
+ my $print_timeout= start_timer($print_freq * 60);
while (1)
{
@@ -4347,7 +4351,22 @@ sub run_testcase ($$) {
}
if (! $keep_waiting_proc)
{
- $proc= My::SafeProcess->wait_any_timeout($test_timeout);
+ if($test_timeout > $print_timeout)
+ {
+ $proc= My::SafeProcess->wait_any_timeout($print_timeout);
+ if ( $proc->{timeout} )
+ {
+ #print out that the test is still on
+ mtr_print("Test still running: $tinfo->{name}");
+ #reset the timer
+ $print_timeout= start_timer($print_freq * 60);
+ next;
+ }
+ }
+ else
+ {
+ $proc= My::SafeProcess->wait_any_timeout($test_timeout);
+ }
}
# Will be restored if we need to keep waiting