Module: tools Branch: master Commit: 1fecf3e5921ac140a58f5d2fd0e785d14dab6b53 URL: https://source.winehq.org/git/tools.git/?a=commit;h=1fecf3e5921ac140a58f5d2f...
Author: Francois Gouget fgouget@codeweavers.com Date: Mon Dec 2 13:52:50 2019 +0100
testbot/LogUtils: Skip the search for new errors if there is no error.
This avoids loading and parsing the reference log when not needed.
Signed-off-by: Francois Gouget fgouget@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
testbot/lib/WineTestBot/LogUtils.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/testbot/lib/WineTestBot/LogUtils.pm b/testbot/lib/WineTestBot/LogUtils.pm index 282906e..5193296 100644 --- a/testbot/lib/WineTestBot/LogUtils.pm +++ b/testbot/lib/WineTestBot/LogUtils.pm @@ -888,10 +888,12 @@ sub GetNewLogErrors($$$) { my ($RefFileName, $Groups, $Errors) = @_;
+ my (@NewGroups, %NewErrors, %NewIndices); + return (@NewGroups, %NewErrors, %NewIndices) if (!@$Groups); + my ($RefGroups, $RefErrors) = GetLogErrors($RefFileName); return (undef, undef) if (!$RefGroups);
- my (@NewGroups, %NewErrors, %NewIndices); foreach my $GroupName (@$Groups) { if ($RefErrors->{$GroupName})