#At file:///home/bm136801/my/repwrn-55/ based on revid:bjorn.munch@stripped
3207 Bjorn Munch 2011-04-27
Bug #11765749 58745: MTR SPENDS LONG TIME CHECKING FOR WARNINGS
Added code to look for repetitions and only repeat warnings once
Reduced time spent in check-warnings by almost 20% for full test suite
Sorry, first commit was buggy
modified:
mysql-test/mysql-test-run.pl
=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl 2011-04-27 07:45:23 +0000
+++ b/mysql-test/mysql-test-run.pl 2011-04-27 13:56:38 +0000
@@ -4116,6 +4116,9 @@ sub extract_warning_lines ($$) {
);
my $skip_valgrind= 0;
+ my $last_pat= "";
+ my $num_rep= 0;
+
foreach my $line ( @lines )
{
if ($opt_valgrind_mysqld) {
@@ -4130,11 +4133,29 @@ sub extract_warning_lines ($$) {
{
if ( $line =~ /$pat/ )
{
- print $Fwarn $line;
+ # Remove initial timestamp and look for consecutive identical lines
+ my $line_pat= $line;
+ $line_pat =~ s/^[0-9: ]*//;
+ if ($line_pat eq $last_pat) {
+ $num_rep++;
+ } else {
+ # Previous line had been repeated, report that first
+ if ($num_rep) {
+ print $Fwarn ".... repeated $num_rep times: $last_pat";
+ $num_rep= 0;
+ }
+ $last_pat= $line_pat;
+ print $Fwarn $line;
+ }
last;
}
}
}
+ # Catch the case of last warning being repeated
+ if ($num_rep) {
+ print $Fwarn ".... repeated $num_rep times: $last_pat";
+ }
+
$Fwarn = undef; # Close file
}
Attachment: [text/bzr-bundle] bzr/bjorn.munch@oracle.com-20110427135638-ne6t1emlwviei0tf.bundle
| Thread |
|---|
| • bzr commit into mysql-5.5-mtr branch (bjorn.munch:3207) Bug#11765749 | Bjorn Munch | 27 Apr |