Francois Gouget : testbot/Engine: Rename the TaskComplete() notification to RescheduleJobs().

Alexandre Julliard julliard at winehq.org
Wed May 14 14:39:15 CDT 2014


Module: tools
Branch: master
Commit: 8e09345b413f4bc7acd64d3dcc3691b20934ab6a
URL:    http://source.winehq.org/git/tools.git/?a=commit;h=8e09345b413f4bc7acd64d3dcc3691b20934ab6a

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Wed May  7 02:34:31 2014 +0200

testbot/Engine: Rename the TaskComplete() notification to RescheduleJobs().

It did not actually use the Task ID and only calls ScheduleJobs() so the new name is more accurate.

---

 testbot/bin/Engine.pl                    |    6 +++---
 testbot/bin/WineRunBuild.pl              |    4 ++--
 testbot/bin/WineRunReconfig.pl           |    4 ++--
 testbot/bin/WineRunTask.pl               |    4 ++--
 testbot/lib/WineTestBot/Engine/Notify.pm |    8 +++-----
 5 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/testbot/bin/Engine.pl b/testbot/bin/Engine.pl
index f0570d7..ea04461 100755
--- a/testbot/bin/Engine.pl
+++ b/testbot/bin/Engine.pl
@@ -390,12 +390,12 @@ sub HandleJobRestart
   return "1OK";
 }
 
-sub HandleTaskComplete
+sub HandleRescheduleJobs
 {
   my $ErrMessage = ScheduleJobs();
   if (defined($ErrMessage))
   {
-    LogMsg "Scheduling problem in HandleTaskComplete: $ErrMessage\n";
+    LogMsg "Scheduling problem in HandleRescheduleJobs: $ErrMessage\n";
   }
 
   return "1OK";
@@ -560,7 +560,7 @@ my %Handlers=(
     "jobsubmit"                => \&HandleJobSubmit,
     "ping"                     => \&HandlePing,
     "shutdown"                 => \&HandleShutdown,
-    "taskcomplete"             => \&HandleTaskComplete,
+    "reschedulejobs"           => \&HandleRescheduleJobs,
     "vmstatuschange"           => \&HandleVMStatusChange,
     "winepatchmlsubmission"    => \&HandleWinePatchMLSubmission,
     "winepatchwebsubmission"   => \&HandleWinePatchWebSubmission,
diff --git a/testbot/bin/WineRunBuild.pl b/testbot/bin/WineRunBuild.pl
index e8561c9..b07454b 100755
--- a/testbot/bin/WineRunBuild.pl
+++ b/testbot/bin/WineRunBuild.pl
@@ -76,7 +76,7 @@ sub FatalError($$$$)
     $VM->Save();
   }
 
-  TaskComplete($JobKey, $StepKey, $TaskKey);
+  RescheduleJobs();
   exit 1;
 }
 
@@ -333,7 +333,7 @@ $Task = undef;
 $Step = undef;
 $Job = undef;
 
-TaskComplete($JobId, $StepNo, $TaskNo);
+RescheduleJobs();
 
 LogMsg "Task $JobId/$StepNo/$TaskNo completed\n";
 exit 0;
diff --git a/testbot/bin/WineRunReconfig.pl b/testbot/bin/WineRunReconfig.pl
index 562b9d1..555f4e4 100755
--- a/testbot/bin/WineRunReconfig.pl
+++ b/testbot/bin/WineRunReconfig.pl
@@ -76,7 +76,7 @@ sub FatalError($$$$)
     $VM->Save();
   }
 
-  TaskComplete($JobKey, $StepKey, $TaskKey);
+  RescheduleJobs();
   exit 1;
 }
 
@@ -291,7 +291,7 @@ $Task = undef;
 $Step = undef;
 $Job = undef;
 
-TaskComplete($JobId, $StepNo, $TaskNo);
+RescheduleJobs();
 
 LogMsg "Task $JobId/$StepNo/$TaskNo completed\n";
 exit 0;
diff --git a/testbot/bin/WineRunTask.pl b/testbot/bin/WineRunTask.pl
index efeac8d..2413a76 100755
--- a/testbot/bin/WineRunTask.pl
+++ b/testbot/bin/WineRunTask.pl
@@ -84,7 +84,7 @@ sub FatalError($$$$$)
   $VM->Status('dirty');
   $VM->Save();
 
-  TaskComplete($JobKey, $StepKey, $TaskKey);
+  RescheduleJobs();
   exit 1;
 }
 
@@ -383,7 +383,7 @@ $Task = undef;
 $Step = undef;
 $Job = undef;
 
-TaskComplete($JobId, $StepNo, $TaskNo);
+RescheduleJobs();
 
 LogMsg "Task $JobId/$StepNo/$TaskNo (" . $VM->Name . ") completed\n";
 exit 0;
diff --git a/testbot/lib/WineTestBot/Engine/Notify.pm b/testbot/lib/WineTestBot/Engine/Notify.pm
index 1a1ab6d..f376337 100644
--- a/testbot/lib/WineTestBot/Engine/Notify.pm
+++ b/testbot/lib/WineTestBot/Engine/Notify.pm
@@ -34,7 +34,7 @@ use vars qw (@ISA @EXPORT @EXPORT_OK $RunningInEngine);
 require Exporter;
 @ISA = qw(Exporter);
 @EXPORT = qw(&Shutdown &PingEngine &JobSubmit &JobStatusChange &JobCancel
-             &JobRestart &TaskComplete &VMStatusChange &FoundWinetestUpdate
+             &JobRestart &RescheduleJobs &VMStatusChange &FoundWinetestUpdate
              &WinePatchMLSubmission &WinePatchWebSubmission &GetScreenshot);
 @EXPORT_OK = qw($RunningInEngine);
 
@@ -167,11 +167,9 @@ sub JobRestart
   return substr($Reply, 1);
 }
 
-sub TaskComplete
+sub RescheduleJobs
 {
-  my ($JobKey, $StepKey, $TaskKey) = @_;
-
-  my $Reply = SendCmdReceiveReply("taskcomplete $JobKey $StepKey $TaskKey\n");
+  my $Reply = SendCmdReceiveReply("reschedulejobs\n");
   if (length($Reply) < 1)
   {
     return "Unrecognized reply received from engine";




More information about the wine-cvs mailing list