Commit 1e7b7c78 authored by Magnus Svensson's avatar Magnus Svensson
Browse files

BUG#39011 mtr reports test failure without any message or log - part 1

parent 4c7ba06c
Loading
Loading
Loading
Loading
+14 −5
Original line number Diff line number Diff line
@@ -3508,13 +3508,22 @@ sub report_failure_and_restart ($) {
  if ( !defined $tinfo->{logfile} )
  {
    my $logfile= $path_current_testlog;
    if ( defined $logfile and -f $logfile )
    if ( defined $logfile )
    {
      if ( -f $logfile )
      {
	# Test failure was detected by test tool and its report
	# about what failed has been saved to file. Save the report
	# in tinfo
	$tinfo->{logfile}= mtr_fromfile($logfile);
      }
      else
      {
	# The test tool report didn't exist, display an
	# error message
	$tinfo->{logfile}= "Could not open test tool report '$logfile'";
      }
    }
  }

  after_failure($tinfo);