Francois Gouget : testbot/Engine: Only reschedule once in HandleWinePatchWebSubmission().
Alexandre Julliard
julliard at winehq.org
Mon May 7 16:32:44 CDT 2018
Module: tools
Branch: master
Commit: 53f26742a6b329f402bcbe8e7782e7a8e32a3a4b
URL: https://source.winehq.org/git/tools.git/?a=commit;h=53f26742a6b329f402bcbe8e7782e7a8e32a3a4b
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Mon May 7 01:57:46 2018 +0200
testbot/Engine: Only reschedule once in HandleWinePatchWebSubmission().
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>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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 64359ae..1775782 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";
}
More information about the wine-cvs
mailing list