summaryrefslogtreecommitdiff
path: root/mysql-test/lib/mtr_report.pm
diff options
context:
space:
mode:
authorBjorn Munch <Bjorn.Munch@sun.com>2009-04-01 13:58:30 +0200
committerBjorn Munch <Bjorn.Munch@sun.com>2009-04-01 13:58:30 +0200
commitba70e8eac7fad5904f16d31192d51e7145b07dcf (patch)
treeddd677c555740f2a0b94c99182bd302b68fff622 /mysql-test/lib/mtr_report.pm
parentce1a3d16563f78ceef617e997299b45b79be233c (diff)
downloadmariadb-git-ba70e8eac7fad5904f16d31192d51e7145b07dcf.tar.gz
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
Diffstat (limited to 'mysql-test/lib/mtr_report.pm')
-rw-r--r--mysql-test/lib/mtr_report.pm13
1 files changed, 12 insertions, 1 deletions
diff --git a/mysql-test/lib/mtr_report.pm b/mysql-test/lib/mtr_report.pm
index 9c6ab35ee5e..1c08244bfc9 100644
--- a/mysql-test/lib/mtr_report.pm
+++ b/mysql-test/lib/mtr_report.pm
@@ -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;