Module: tools
Branch: master
Commit: 53f26742a6b329f402bcbe8e7782e7a8e32a3a4b
URL: https://source.winehq.org/git/tools.git/?a=commit;h=53f26742a6b329f402bcbe8…
Author: Francois Gouget <fgouget(a)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(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)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";
}
Module: tools
Branch: master
Commit: 54621055ec0ceb7a11b227e08c2905ad3ad1b740
URL: https://source.winehq.org/git/tools.git/?a=commit;h=54621055ec0ceb7a11b227e…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Mon May 7 01:57:36 2018 +0200
testbot: Scheduling jobs is the Engine's responsibility.
It already does not make sense to call ScheduleJobs() in other
processes. So only call it from Engine.pl.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/bin/Engine.pl | 6 +++++-
testbot/lib/WineTestBot/Patches.pm | 7 ++-----
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/testbot/bin/Engine.pl b/testbot/bin/Engine.pl
index 3d1f2c1..b61db88 100755
--- a/testbot/bin/Engine.pl
+++ b/testbot/bin/Engine.pl
@@ -448,6 +448,8 @@ sub HandleWinePatchMLSubmission()
my $ErrMessage = CreatePatches()->NewPatch($Entity);
push @ErrMessages, $ErrMessage if (defined $ErrMessage);
+ ScheduleJobs();
+
# Clean up
if (!rmtree($WorkDir))
{
@@ -520,6 +522,8 @@ sub HandleWinePatchWebSubmission()
my $ErrMessage = $Patches->NewPatch($Entity, $WebPatchId);
push @ErrMessages, $ErrMessage if (defined $ErrMessage);
+ ScheduleJobs();
+
# Clean up
if (!rmtree($WorkDir))
{
@@ -621,7 +625,6 @@ checks whether any pending patchsets are now complete and thus can be scheduled.
sub SafetyNet()
{
CheckJobs();
- ScheduleJobs();
HandleWinePatchWebSubmission();
my $Set = CreatePendingPatchSets();
@@ -630,6 +633,7 @@ sub SafetyNet()
{
LogMsg "Failed to check completeness of patch series: $ErrMessage\n";
}
+ ScheduleJobs();
}
sub PrepareSocket($)
diff --git a/testbot/lib/WineTestBot/Patches.pm b/testbot/lib/WineTestBot/Patches.pm
index 5edeab0..26127e9 100644
--- a/testbot/lib/WineTestBot/Patches.pm
+++ b/testbot/lib/WineTestBot/Patches.pm
@@ -147,8 +147,8 @@ sub GetTestList()
Analyzes the current patch to determine which Wine tests are impacted. Then for
each impacted test it creates a high priority WineTestBot::Job to run that test.
This also creates the WineTestBot::Step objects for that Job, as well as the
-WineTestBot::Task objects to run the test on each 'base' VM. Finally it calls
-C<WineTestBot::Jobs::ScheduleJobs()> to run the new Jobs.
+WineTestBot::Task objects to run the test on each 'base' VM. It is the
+responsibility of the caller to arrange for rescheduling of the jobs.
Note that the path to the file containing the actual patch is passed as a
parameter. This is used to apply a combined patch for patch series. See
@@ -341,9 +341,6 @@ sub Submit($$$)
$Disposition .= $NewJob->Id;
}
$self->Disposition($Disposition);
-
- ScheduleJobs();
-
return undef;
}