Francois Gouget : testbot/Engine: The ExpectWinetestUpdate notification is unused. Remove it.

Alexandre Julliard julliard at winehq.org
Mon Mar 25 13:55:06 CDT 2013


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

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Sun Mar 24 23:41:00 2013 +0100

testbot/Engine: The ExpectWinetestUpdate notification is unused. Remove it.

---

 testbot/bin/Engine.pl                    |   66 +-----------------------------
 testbot/lib/WineTestBot/Engine/Notify.pm |   18 +--------
 2 files changed, 2 insertions(+), 82 deletions(-)

diff --git a/testbot/bin/Engine.pl b/testbot/bin/Engine.pl
index 3f9c9b4..489c686 100755
--- a/testbot/bin/Engine.pl
+++ b/testbot/bin/Engine.pl
@@ -236,79 +236,16 @@ sub HandleVMStatusChange
   return "1OK";
 }
 
-sub CheckForWinetestUpdate
-{
-  my $Bits = $_[0];
-
-  $ActiveBackEnds{'WineTestBot'}->PrepareForFork();
-  my $Pid = fork;
-  if (!defined $Pid)
-  {
-    LogMsg "Unable to fork for CheckForWinetestUpdate.pl: $!\n";
-  }
-  elsif (!$Pid)
-  {
-    WineTestBot::Log::SetupRedirects();
-    exec("$BinDir/CheckForWinetestUpdate.pl $Bits") or
-    LogMsg "Unable to exec CheckForWinetestUpdate.pl: $!\n";
-    exit(1);
-  }
-}
-
-sub CheckForWinetestUpdate32
-{
-  CheckForWinetestUpdate(32);
-}
-
-sub CheckForWinetestUpdate64
-{
-  CheckForWinetestUpdate(64);
-}
-
-sub GiveUpOnWinetestUpdate
-{
-  DeleteEvent("CheckForWinetestUpdate32");
-  DeleteEvent("CheckForWinetestUpdate64");
-  LogMsg "Giving up on winetest.exe update\n";
-}
-
-sub HandleExpectWinetestUpdate
-{
-  if (EventScheduled("GiveUpOnWinetestUpdate"))
-  {
-    DeleteEvent("GiveUpOnWinetestUpdate");
-  }
-  else
-  {
-    AddEvent("CheckForWinetestUpdate32", 300, 1, \&CheckForWinetestUpdate32);
-    AddEvent("CheckForWinetestUpdate64", 300, 1, \&CheckForWinetestUpdate64);
-  }
-  AddEvent("GiveUpOnWinetestUpdate", 3660, 0, \&GiveUpOnWinetestUpdate);
-
-  return "1OK";
-}
-
 sub HandleFoundWinetestUpdate
 {
   my $Bits = $_[0];
 
-  if ($Bits =~ m/^(32|64)$/)
-  {
-    $Bits = $1;
-  }
-  else
+  if ($Bits !~ /^(?:32|64)$/)
   {
     LogMsg "Invalid number of bits in foundwinetestupdate message\n";
     return "0Invalid number of bits";
   }
 
-  DeleteEvent("CheckForWinetestUpdate${Bits}");
-  if (! EventScheduled("CheckForWinetestUpdate32") &&
-      ! EventScheduled("CheckForWinetestUpdate64"))
-  {
-    DeleteEvent("GiveUpOnWinetestUpdate");
-  }
-
   my $ErrMessage = ScheduleJobs();
   if (defined($ErrMessage))
   {
@@ -418,7 +355,6 @@ sub HandleGetScreenshot
 }
 
 my %Handlers=(
-    "expectwinetestupdate"     => \&HandleExpectWinetestUpdate,
     "foundwinetestupdate"      => \&HandleFoundWinetestUpdate,
     "getscreenshot"            => \&HandleGetScreenshot,
     "jobcancel"                => \&HandleJobCancel,
diff --git a/testbot/lib/WineTestBot/Engine/Notify.pm b/testbot/lib/WineTestBot/Engine/Notify.pm
index c0793d5..8452615 100644
--- a/testbot/lib/WineTestBot/Engine/Notify.pm
+++ b/testbot/lib/WineTestBot/Engine/Notify.pm
@@ -34,8 +34,7 @@ use vars qw (@ISA @EXPORT @EXPORT_OK $RunningInEngine);
 require Exporter;
 @ISA = qw(Exporter);
 @EXPORT = qw(&PingEngine &JobSubmit &JobStatusChange &JobCancel &JobRestart
-             &TaskComplete &VMStatusChange
-             &ExpectWinetestUpdate &FoundWinetestUpdate
+             &TaskComplete &VMStatusChange &FoundWinetestUpdate
              &WinePatchMLSubmission &WinePatchWebSubmission &GetScreenshot);
 @EXPORT_OK = qw($RunningInEngine);
 
@@ -183,21 +182,6 @@ sub VMStatusChange
   return substr($Reply, 1);
 }
 
-sub ExpectWinetestUpdate
-{
-  my $Reply = SendCmdReceiveReply("expectwinetestupdate\n");
-  if (length($Reply) < 1)
-  {
-    return "Unrecognized reply received from engine";
-  }
-  if (substr($Reply, 0, 1) eq "1")
-  {
-    return undef;
-  }
- 
-  return substr($Reply, 1);
-}
-
 sub FoundWinetestUpdate
 {
   my $Bits = $_[0];




More information about the wine-cvs mailing list