Francois Gouget : testbot/LogUtils: Identify invalid line numbers in the .errors file.
Alexandre Julliard
julliard at winehq.org
Fri Feb 21 14:19:59 CST 2020
Module: tools
Branch: master
Commit: 26e7a912c68a9d98fa974f0e1f758d1199a035b6
URL: https://source.winehq.org/git/tools.git/?a=commit;h=26e7a912c68a9d98fa974f0e1f758d1199a035b6
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Fri Feb 21 03:00:04 2020 +0100
testbot/LogUtils: Identify invalid line numbers in the .errors file.
This should never happen but if it does this helps with diagnosis.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
testbot/lib/WineTestBot/LogUtils.pm | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/testbot/lib/WineTestBot/LogUtils.pm b/testbot/lib/WineTestBot/LogUtils.pm
index 863cca6..690bc03 100644
--- a/testbot/lib/WineTestBot/LogUtils.pm
+++ b/testbot/lib/WineTestBot/LogUtils.pm
@@ -848,9 +848,10 @@ sub LoadLogErrors($)
return $LogInfo;
}
- my $CurGroup;
+ my ($LineNo, $CurGroup);
foreach my $Line (<$ErrorsFile>)
{
+ $LineNo++;
chomp $Line;
my ($Type, $Property, $Value) = split / /, $Line, 3;
if ($Type eq "p")
@@ -861,7 +862,7 @@ sub LoadLogErrors($)
}
else
{
- $LogInfo->{BadLog} = "Cannot set $Property = $Value because it is already set to $LogInfo->{$Property}";
+ $LogInfo->{BadLog} = "$LineNo: Cannot set $Property = $Value because it is already set to $LogInfo->{$Property}";
last;
}
}
@@ -871,7 +872,7 @@ sub LoadLogErrors($)
}
elsif (!$CurGroup)
{
- $LogInfo->{BadLog} = "Got a $Type line with no group";
+ $LogInfo->{BadLog} = "$LineNo: Got a $Type line with no group";
last;
}
elsif ($Type eq "o")
@@ -884,7 +885,7 @@ sub LoadLogErrors($)
}
else
{
- $LogInfo->{BadLog} = "Found an unknown line type ($Type)";
+ $LogInfo->{BadLog} = "$LineNo: Found an unknown line type ($Type)";
last;
}
}
More information about the wine-cvs
mailing list