Module: tools Branch: master Commit: 84cb43cede00f1bc3d00964a4a457f69cb176bb3 URL: https://source.winehq.org/git/tools.git/?a=commit;h=84cb43cede00f1bc3d00964a...
Author: Francois Gouget fgouget@codeweavers.com Date: Thu Apr 8 12:38:24 2021 +0200
testbot/WineRun*: Standardize the WrapUpAndExit() functions.
Signed-off-by: Francois Gouget fgouget@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
testbot/bin/WineRunBuild.pl | 7 +++---- testbot/bin/WineRunReconfig.pl | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/testbot/bin/WineRunBuild.pl b/testbot/bin/WineRunBuild.pl index 8a92f88..13f488b 100755 --- a/testbot/bin/WineRunBuild.pl +++ b/testbot/bin/WineRunBuild.pl @@ -181,16 +181,15 @@ sub LogTaskError($) print STDERR "$Name0:error: ", $ErrMessage; }
-sub WrapUpAndExit($;$$$) +sub WrapUpAndExit($;$$$$) { - my ($Status, $Retry, $TimedOut, $Reason) = @_; + my ($Status, $TestFailures, $Retry, $TimedOut, $Reason) = @_; my $NewVMStatus = $Status eq 'queued' ? 'offline' : 'dirty'; my $VMResult = defined $Reason ? $Reason : $Status eq "boterror" ? "boterror" : $Status eq "queued" ? "error" : $TimedOut ? "timeout" : "";
- my $TestFailures; my $Tries = $Task->TestFailures || 0; if ($Retry) { @@ -490,4 +489,4 @@ $TA->Disconnect(); # Wrap up #
-WrapUpAndExit($NewStatus, undef, $TaskTimedOut); +WrapUpAndExit($NewStatus, undef, undef, $TaskTimedOut); diff --git a/testbot/bin/WineRunReconfig.pl b/testbot/bin/WineRunReconfig.pl index 49e7305..ec82849 100755 --- a/testbot/bin/WineRunReconfig.pl +++ b/testbot/bin/WineRunReconfig.pl @@ -182,9 +182,9 @@ sub LogTaskError($) print STDERR "$Name0:error: ", $ErrMessage; }
-sub WrapUpAndExit($;$$$) +sub WrapUpAndExit($;$$$$) { - my ($Status, $Retry, $TimedOut, $Reason) = @_; + my ($Status, $TestFailures, $Retry, $TimedOut, $Reason) = @_; my $NewVMStatus = $Status eq 'queued' ? 'offline' : $Status eq 'completed' ? 'idle' : 'dirty'; my $VMResult = defined $Reason ? $Reason : @@ -192,7 +192,6 @@ sub WrapUpAndExit($;$$$) $Status eq "queued" ? "error" : $TimedOut ? "timeout" : "";
- my $TestFailures; my $Tries = $Task->TestFailures || 0; if ($Retry) { @@ -567,4 +566,4 @@ if ($NewStatus eq 'completed') # In case of a regular build failure retrying is pointless. But in case of a # timeout the VM host may be less busy next time and since the snapshot is # unchanged we can retry. -WrapUpAndExit($NewStatus, $TaskTimedOut, $TaskTimedOut); +WrapUpAndExit($NewStatus, undef, $TaskTimedOut, $TaskTimedOut);