[tools] testbot: Limit chomping of log lines to CR and LF.

Francois Gouget fgouget at codeweavers.com
Tue Feb 18 21:17:07 CST 2020


This fixes handling of failures (and todos, etc) where the message
starts with a linefeed.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
 testbot/lib/WineTestBot/LogUtils.pm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/testbot/lib/WineTestBot/LogUtils.pm b/testbot/lib/WineTestBot/LogUtils.pm
index 453ec29a99..fd0a845955 100644
--- a/testbot/lib/WineTestBot/LogUtils.pm
+++ b/testbot/lib/WineTestBot/LogUtils.pm
@@ -254,7 +254,8 @@ sub ParseTaskLog($)
   foreach my $Line (<$LogFile>)
   {
     $LineNo++;
-    $Line =~ s/\s*$//; # chomp \r, \n and more
+    chomp $Line;
+    $Line =~ s/\r+$//;
 
     if (GetLogLineCategory($Line) eq "error")
     {
@@ -525,7 +526,8 @@ sub ParseWineTestReport($$$)
   {
     $LineNo++;
     $Cur->{UnitSize} += length($Line);
-    $Line =~ s/\s*$//; # chomp \r, \n and more
+    chomp $Line;
+    $Line =~ s/\r+$//;
 
     if (GetReportLineCategory($Line) eq "error")
     {
-- 
2.20.1



More information about the wine-devel mailing list