[tools 4/5] testbot/LogUtils: Add support for recursive structures to _DumpErrors().
Francois Gouget
fgouget at codeweavers.com
Tue Jan 19 11:56:05 CST 2021
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
testbot/lib/WineTestBot/LogUtils.pm | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/testbot/lib/WineTestBot/LogUtils.pm b/testbot/lib/WineTestBot/LogUtils.pm
index 30038cf6..3488c7b2 100644
--- a/testbot/lib/WineTestBot/LogUtils.pm
+++ b/testbot/lib/WineTestBot/LogUtils.pm
@@ -1010,17 +1010,25 @@ sub _SaveLogErrors($)
return "Could not open '$LogInfo->{LogName}.errors' for writing: $!";
}
-sub _DumpErrors($$)
+sub _DumpErrors
{
my ($Label, $LogInfo) = @_;
print STDERR "$Label:\n";
+ my @SubKeys;
foreach my $Key (sort keys %{$LogInfo})
{
next if ($Key =~ /^(?:ErrGroupNames|ErrGroups|NewCount)$/);
+ if (ref($LogInfo->{$Key}) eq "HASH")
+ {
+ push @SubKeys, $Key;
+ next;
+ }
+
print STDERR "+ $Key $LogInfo->{$Key}\n";
}
_WriteLogErrorsToFh(*STDERR, $LogInfo);
+ map { _DumpErrors("$Label.$_", $LogInfo->{$_}) } (@SubKeys);
}
--
2.20.1
More information about the wine-devel
mailing list