Module: tools Branch: master Commit: f9a201bd8db774e7753beb5fa60ff557b6dfa3fb URL: https://source.winehq.org/git/tools.git/?a=commit;h=f9a201bd8db774e7753beb5f...
Author: Francois Gouget fgouget@codeweavers.com Date: Thu Oct 18 11:13:15 2018 +0200
testbot: Avoid some unneeded regular expressions when parsing logs.
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, 2 insertions(+), 2 deletions(-)
diff --git a/testbot/lib/WineTestBot/LogUtils.pm b/testbot/lib/WineTestBot/LogUtils.pm index 6caa021..1f3831b 100644 --- a/testbot/lib/WineTestBot/LogUtils.pm +++ b/testbot/lib/WineTestBot/LogUtils.pm @@ -83,11 +83,11 @@ sub ParseTaskLog($) foreach my $Line (<$LogFile>) { chomp $Line; - if ($Line =~ /^Task: ok$/) + if ($Line eq "Task: ok") { $Result ||= "ok"; } - elsif ($Line =~ /^Task: Patch failed to apply$/) + elsif ($Line eq "Task: Patch failed to apply") { $Result = "badpatch"; last; # Should be the last and most specific message