Module: tools Branch: master Commit: dd460665790affcb05e7896470f971ea338f80f0 URL: https://source.winehq.org/git/tools.git/?a=commit;h=dd460665790affcb05e78964...
Author: Francois Gouget fgouget@codeweavers.com Date: Tue Jan 19 18:56:05 2021 +0100
testbot/LogUtils: Add support for recursive structures to _DumpErrors().
Signed-off-by: Francois Gouget fgouget@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
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 30038cf..3488c7b 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); }