diff options
Diffstat (limited to 'mysql-test/mysql-test-run.pl')
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index cb69a3c0124..f7ab9be1c48 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -749,9 +749,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'); @@ -4150,6 +4152,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; @@ -4333,6 +4336,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) { @@ -4357,7 +4361,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 |