Francois Gouget : testbot: Scheduling jobs is the Engine's responsibility.

Alexandre Julliard julliard at winehq.org
Mon May 7 16:32:44 CDT 2018


Module: tools
Branch: master
Commit: 54621055ec0ceb7a11b227e08c2905ad3ad1b740
URL:    https://source.winehq.org/git/tools.git/?a=commit;h=54621055ec0ceb7a11b227e08c2905ad3ad1b740

Author: Francois Gouget <fgouget at 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 at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at 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;
 }
 




More information about the wine-cvs mailing list