Francois Gouget : testbot/Engine: Only reschedule once in HandleWinePatchMLSubmission().

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


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

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Mon May  7 01:57:41 2018 +0200

testbot/Engine: Only reschedule once in HandleWinePatchMLSubmission().

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 | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/testbot/bin/Engine.pl b/testbot/bin/Engine.pl
index b61db88..64359ae 100755
--- a/testbot/bin/Engine.pl
+++ b/testbot/bin/Engine.pl
@@ -431,7 +431,7 @@ sub HandleWinePatchMLSubmission()
   my @Entries = readdir($dh);
   closedir($dh);
 
-  my @ErrMessages;
+  my ($NewPatch, @ErrMessages);
   foreach my $Entry (@Entries)
   {
     # Validate file name
@@ -446,9 +446,14 @@ sub HandleWinePatchMLSubmission()
     $Parser->output_dir($WorkDir);
     my $Entity = $Parser->parse_open($FullMessageFileName);
     my $ErrMessage = CreatePatches()->NewPatch($Entity);
-    push @ErrMessages, $ErrMessage if (defined $ErrMessage);
-
-    ScheduleJobs();
+    if (defined $ErrMessage)
+    {
+      push @ErrMessages, $ErrMessage;
+    }
+    else
+    {
+      $NewPatch = 1;
+    }
 
     # Clean up
     if (!rmtree($WorkDir))
@@ -463,6 +468,7 @@ sub HandleWinePatchMLSubmission()
       LogMsg "Unable to delete '$FullMessageFileName': $!\n";
     }
   }
+  ScheduleJobs() if ($NewPatch);
 
   return @ErrMessages ? "0". join("; ", @ErrMessages) : "1OK";
 }




More information about the wine-cvs mailing list