MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Bjorn Munch Date:April 1 2009 11:59am
Subject:bzr commit into mysql-5.1-mtr branch (Bjorn.Munch:2779) Bug#43917
View as plain text  
#At file:///home/bm136801/mysql/repcnt-51/

 2779 Bjorn Munch	2009-04-01
      Bug #43917 MTR2 does not report accurate test statistics when using the 'repeat=n'
      option
      In practice, only the last run of the test was counted
      Add a separate counter rep_failures for failures before last run
      modified:
        mysql-test/lib/mtr_report.pm
        mysql-test/mysql-test-run.pl

=== modified file 'mysql-test/lib/mtr_report.pm'
--- a/mysql-test/lib/mtr_report.pm	2009-03-09 11:59:34 +0000
+++ b/mysql-test/lib/mtr_report.pm	2009-04-01 11:58:30 +0000
@@ -257,6 +257,17 @@ sub mtr_report_stats ($) {
       $tot_restarts++;
     }
 
+    # Add counts for repeated runs, if any.
+    # Note that the last run has already been counted above.
+    my $num_repeat = $tinfo->{'repeat'} - 1;
+    if ( $num_repeat > 0 )
+    {
+      $tot_tests += $num_repeat;
+      my $rep_failed = $tinfo->{'rep_failures'} || 0;
+      $tot_failed += $rep_failed;
+      $tot_passed += $num_repeat - $rep_failed;
+    }
+
     # Look for warnings produced by mysqltest
     my $base_file= mtr_match_extension($tinfo->{'result_file'},
 				       "result"); # Trim extension
@@ -336,7 +347,7 @@ sub mtr_report_stats ($) {
     foreach my $tinfo (@$tests)
     {
       my $tname= $tinfo->{'name'};
-      if ( $tinfo->{failures} and ! $seen{$tname})
+      if ( ($tinfo->{failures} || $tinfo->{rep_failures}) and ! $seen{$tname})
       {
         print " $tname";
 	$seen{$tname}= 1;

=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl	2009-03-31 14:10:44 +0000
+++ b/mysql-test/mysql-test-run.pl	2009-04-01 11:58:30 +0000
@@ -555,9 +555,11 @@ sub run_test_server ($$$) {
 
 	  # Repeat test $opt_repeat number of times
 	  my $repeat= $result->{repeat} || 1;
-	  if ($repeat < $opt_repeat)
+	  # Don't repeat if test was skipped
+	  if ($repeat < $opt_repeat && $result->{'result'} ne 'MTR_RES_SKIPPED')
 	  {
 	    $result->{retries}= 0;
+	    $result->{rep_failures}++ if $result->{failures};
 	    $result->{failures}= 0;
 	    delete($result->{result});
 	    $result->{repeat}= $repeat+1;

Thread
bzr commit into mysql-5.1-mtr branch (Bjorn.Munch:2779) Bug#43917Bjorn Munch1 Apr