MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Bjorn Munch Date:December 15 2009 9:13am
Subject:bzr commit into mysql-5.1-mtr branch (Bjorn.Munch:2866) Bug#49672
View as plain text  
#At file:///home/bm136801/my/exit1-51/ based on revid:bjorn.munch@stripped

 2866 Bjorn Munch	2009-12-15
      Bug #49672 mtr should extract end of result log if mysqltest fails without output
      Extracts last 20 lines if no output after failure

    modified:
      mysql-test/mysql-test-run.pl
=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl	2009-11-26 10:34:16 +0000
+++ b/mysql-test/mysql-test-run.pl	2009-12-15 09:12:24 +0000
@@ -3500,7 +3500,7 @@ sub run_testcase ($) {
       {
 	# mysqltest failed, probably crashed
 	$tinfo->{comment}=
-	  "mysqltest failed with unexpected return code $res";
+	  "mysqltest failed with unexpected return code $res\n";
 	report_failure_and_restart($tinfo);
       }
 
@@ -4091,6 +4091,19 @@ sub report_failure_and_restart ($) {
 	# about what failed has been saved to file. Save the report
 	# in tinfo
 	$tinfo->{logfile}= mtr_fromfile($logfile);
+	# If no newlines in the test log:
+	if ($tinfo->{logfile} !~ /\n/)
+	{
+	  # Show how far it got before suddenly failing
+	  $tinfo->{comment}.= "mysqltest failed but provided no output\n";
+	  my $log_file_name= $opt_vardir."/log/".$tinfo->{shortname}.".log";
+	  if (-e $log_file_name) {
+	    $tinfo->{comment}.=
+	      "The result from queries just before the failure was:".
+	      "\n< snip >\n".
+	      mtr_lastlinesfromfile($log_file_name, 20)."\n";
+	  }
+	}
       }
       else
       {


Attachment: [text/bzr-bundle] bzr/bjorn.munch@sun.com-20091215091224-vvtxtphfxce49lth.bundle
Thread
bzr commit into mysql-5.1-mtr branch (Bjorn.Munch:2866) Bug#49672Bjorn Munch15 Dec