[PATCH 3/4] testbot/Engine: Only reschedule once in HandleWinePatchWebSubmission().
Francois Gouget
fgouget at codeweavers.com
Sun May 6 18:57:46 CDT 2018
There is no need to reschedule after handling each patch in the staging
directory. The scheduler will handle them all at once.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
testbot/bin/Engine.pl | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/testbot/bin/Engine.pl b/testbot/bin/Engine.pl
index 64359ae06..177578209 100755
--- a/testbot/bin/Engine.pl
+++ b/testbot/bin/Engine.pl
@@ -516,6 +516,7 @@ sub HandleWinePatchWebSubmission()
# Add the patches in increasing WebPatchId order so that next time
# $LatestWebPatchId still makes sense in case something goes wrong now
+ my $NewPatch;
foreach my $WebPatchId (sort { $a <=> $b } @WebPatchIds)
{
# Create a working dir
@@ -526,9 +527,14 @@ sub HandleWinePatchWebSubmission()
$Parser->output_dir($WorkDir);
my $Entity = $Parser->parse_open("$DataDir/webpatches/$WebPatchId");
my $ErrMessage = $Patches->NewPatch($Entity, $WebPatchId);
- push @ErrMessages, $ErrMessage if (defined $ErrMessage);
-
- ScheduleJobs();
+ if (defined $ErrMessage)
+ {
+ push @ErrMessages, $ErrMessage;
+ }
+ else
+ {
+ $NewPatch = 1;
+ }
# Clean up
if (!rmtree($WorkDir))
@@ -537,6 +543,7 @@ sub HandleWinePatchWebSubmission()
LogMsg "Unable to delete '$WorkDir': $!\n";
}
}
+ ScheduleJobs() if ($NewPatch);
return @ErrMessages ? "0". join("; ", @ErrMessages) : "1OK";
}
--
2.17.0
More information about the wine-devel
mailing list