Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/lib/WineTestBot/LogUtils.pm | 31 +++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-)
diff --git a/testbot/lib/WineTestBot/LogUtils.pm b/testbot/lib/WineTestBot/LogUtils.pm index 17d44a44c0..1bb8f5aa1d 100644 --- a/testbot/lib/WineTestBot/LogUtils.pm +++ b/testbot/lib/WineTestBot/LogUtils.pm @@ -42,6 +42,27 @@ use WineTestBot::Config; # For $MaxUnitSize # Task log parser #
+=pod +=over 12 + +=item C<_IsPerlError()> + +Returns true if the string looks like a Perl error message. + +=back +=cut + +sub _IsPerlError($) +{ + my ($Str) = @_; + + return $Str =~ /^Use of uninitialized value / || + $Str =~ /^Undefined subroutine / || + $Str =~ /^Global symbol / || + $Str =~ /^Possible precedence issue /; +} + + =pod =over 12
@@ -71,11 +92,7 @@ sub ParseTaskLog($) $Result = "badpatch"; last; # Should be the last and most specific message } - elsif ($Line =~ /^Task: / or - # Typical perl errors - $Line =~ /^Use of uninitialized value / or - $Line =~ /^Undefined subroutine / or - $Line =~ /^Global symbol /) + elsif ($Line =~ /^Task: / or _IsPerlError($Line)) { $Result = "failed"; } @@ -115,9 +132,7 @@ sub GetLogLineCategory($) $Line =~ /^Makefile:[0-9]+: recipe for target .* failed$/ or $Line =~ /^(?:Build|Reconfig|Task): (?!ok)/ or # Typical perl errors - $Line =~ /^Use of uninitialized value / or - $Line =~ /^Undefined subroutine / or - $Line =~ /^Global symbol /) + _IsPerlError($Line)) { return "error"; }