Module: tools Branch: master Commit: a8430bf9165051f41657634a925e9675482a22ae URL: https://source.winehq.org/git/tools.git/?a=commit;h=a8430bf9165051f41657634a...
Author: Francois Gouget fgouget@codeweavers.com Date: Thu Aug 23 10:46:29 2018 +0200
testbot: Remove support for the old task status lines.
Note that there is no need to wait for all task logs to be in the new format because ParseTaskLog() is only called when a new task completes.
Signed-off-by: Francois Gouget fgouget@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
testbot/bin/WineRunBuild.pl | 2 +- testbot/bin/WineRunReconfig.pl | 2 +- testbot/bin/WineRunWineTest.pl | 2 +- testbot/lib/WineTestBot/LogUtils.pm | 10 +++++----- 4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/testbot/bin/WineRunBuild.pl b/testbot/bin/WineRunBuild.pl index 2c5fbfa..b246164 100755 --- a/testbot/bin/WineRunBuild.pl +++ b/testbot/bin/WineRunBuild.pl @@ -406,7 +406,7 @@ if (!defined $TA->Wait($Pid, $Task->Timeout, 60)) Debug(Elapsed($Start), " Retrieving 'Build.log'\n"); if ($TA->GetFile("Build.log", "$TaskDir/log")) { - my $Result = ParseTaskLog("$TaskDir/log", "Build"); + my $Result = ParseTaskLog("$TaskDir/log"); if ($Result eq "ok") { # We must have gotten the full log and the build did succeed. diff --git a/testbot/bin/WineRunReconfig.pl b/testbot/bin/WineRunReconfig.pl index 2301804..1e126b8 100755 --- a/testbot/bin/WineRunReconfig.pl +++ b/testbot/bin/WineRunReconfig.pl @@ -388,7 +388,7 @@ if (!defined $TA->Wait($Pid, $Task->Timeout, 60)) Debug(Elapsed($Start), " Retrieving 'Reconfig.log'\n"); if ($TA->GetFile("Reconfig.log", "$TaskDir/log")) { - my $Result = ParseTaskLog("$TaskDir/log", "Reconfig"); + my $Result = ParseTaskLog("$TaskDir/log"); if ($Result eq "ok") { # We must have gotten the full log and the build did succeed. diff --git a/testbot/bin/WineRunWineTest.pl b/testbot/bin/WineRunWineTest.pl index 2168111..2552a7c 100755 --- a/testbot/bin/WineRunWineTest.pl +++ b/testbot/bin/WineRunWineTest.pl @@ -499,7 +499,7 @@ if (!defined $TA->Wait($Pid, $Task->Timeout, 60)) Debug(Elapsed($Start), " Retrieving 'Task.log'\n"); if ($TA->GetFile("Task.log", "$TaskDir/log")) { - my $Result = ParseTaskLog("$TaskDir/log", "Task"); + my $Result = ParseTaskLog("$TaskDir/log"); if ($Result eq "ok") { # We must have gotten the full log and the build did succeed. diff --git a/testbot/lib/WineTestBot/LogUtils.pm b/testbot/lib/WineTestBot/LogUtils.pm index d39c81b..e05afb6 100644 --- a/testbot/lib/WineTestBot/LogUtils.pm +++ b/testbot/lib/WineTestBot/LogUtils.pm @@ -50,9 +50,9 @@ Returns ok if the task was successful and an error code otherwise. =back =cut
-sub ParseTaskLog($$) +sub ParseTaskLog($) { - my ($FileName, $ResultPrefix) = @_; + my ($FileName) = @_;
if (open(my $LogFile, "<", $FileName)) { @@ -60,16 +60,16 @@ sub ParseTaskLog($$) foreach my $Line (<$LogFile>) { chomp $Line; - if ($Line =~ /^(?:$ResultPrefix|Task): ok$/) + if ($Line =~ /^Task: ok$/) { $Result ||= "ok"; } - elsif ($Line =~ /^(?:$ResultPrefix|Task): Patch failed to apply$/) + elsif ($Line =~ /^Task: Patch failed to apply$/) { $Result = "badpatch"; last; # Should be the last and most specific message } - elsif ($Line =~ /^(?:$ResultPrefix|Task): /) + elsif ($Line =~ /^Task: /) { $Result = "failed"; }