summaryrefslogtreecommitdiff
path: root/mysql-test/mysql-test-run.pl
diff options
context:
space:
mode:
authorBjorn Munch <bjorn.munch@oracle.com>2011-04-29 15:28:52 +0200
committerBjorn Munch <bjorn.munch@oracle.com>2011-04-29 15:28:52 +0200
commit3f2a18026c4a6b25dd1708748024b40cf777a864 (patch)
treed2f904bd8c581437670d9456a5f37b007f26e92c /mysql-test/mysql-test-run.pl
parenta01b2eb70ffae61989f3f62e763d7f4974df4274 (diff)
downloadmariadb-git-3f2a18026c4a6b25dd1708748024b40cf777a864.tar.gz
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
Diffstat (limited to 'mysql-test/mysql-test-run.pl')
-rwxr-xr-xmysql-test/mysql-test-run.pl23
1 files changed, 22 insertions, 1 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index c288a16d233..5c7b4fc7d02 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -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
}