Bug #16190704: MTR STILL LOSES THE FAILED RUN LOGS AT RETRY-FAIL

This commit is contained in:
sayantan.dutta@oracle.com 2013-02-04 20:25:30 +05:30
parent 2993c299d7
commit 66eb0c6e98

View file

@ -617,9 +617,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');