diff options
author | Bjorn Munch <Bjorn.Munch@sun.com> | 2009-08-31 15:22:54 +0200 |
---|---|---|
committer | Bjorn Munch <Bjorn.Munch@sun.com> | 2009-08-31 15:22:54 +0200 |
commit | 822f810375660ce33d43b3535aa18c23d4572ed7 (patch) | |
tree | 73b71bb0d71cad7be64c7d8674b5ec76b68e60ad | |
parent | 5166a56d0406fe6ab51e0b3cb91202497c888b8c (diff) | |
parent | de5ab42de65abb375a9c6cebdc2e490340816b96 (diff) | |
download | mariadb-git-822f810375660ce33d43b3535aa18c23d4572ed7.tar.gz |
merge
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 429fbfe41c6..5a5d063c105 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -3571,8 +3571,8 @@ sub run_testcase ($) { # error log and write all lines that look # suspicious into $error_log.warnings # -sub extract_warning_lines ($) { - my ($error_log) = @_; +sub extract_warning_lines ($$) { + my ($error_log, $tname) = @_; # Open the servers .err log file and read all lines # belonging to current tets into @lines @@ -3580,14 +3580,27 @@ sub extract_warning_lines ($) { or mtr_error("Could not open file '$error_log' for reading: $!"); my @lines; + my $found_test= 0; # Set once we've found the log of this test while ( my $line = <$Ferr> ) { - if ( $line =~ /^CURRENT_TEST:/ ) + if ($found_test) { - # Throw away lines from previous tests - @lines = (); + # If test wasn't last after all, discard what we found, test again. + if ( $line =~ /^CURRENT_TEST:/) + { + @lines= (); + $found_test= $line =~ /^CURRENT_TEST: $tname/; + } + else + { + push(@lines, $line); + } + } + else + { + # Search for beginning of test, until found + $found_test= 1 if ($line =~ /^CURRENT_TEST: $tname/); } - push(@lines, $line); } $Ferr = undef; # Close error log file @@ -3665,7 +3678,7 @@ sub start_check_warnings ($$) { my $log_error= $mysqld->value('#log-error'); # To be communicated to the test $ENV{MTR_LOG_ERROR}= $log_error; - extract_warning_lines($log_error); + extract_warning_lines($log_error, $tinfo->{name}); my $args; mtr_init_args(\$args); |