Francois Gouget : testbot/TestAgent: Don't fail if ConfigLocal. pl is missing.

Alexandre Julliard julliard at winehq.org
Tue Jan 22 12:57:43 CST 2013


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

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Tue Jan 22 04:01:53 2013 +0100

testbot/TestAgent: Don't fail if ConfigLocal.pl is missing.

The TestAgent script only needs the TestAgent port from that file, and
we can require that the user specify it on the command line. This
makes it possible to run TestAgent from any host without requiring
complex setup.

---

 testbot/scripts/TestAgent |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/testbot/scripts/TestAgent b/testbot/scripts/TestAgent
index a4c8e1a..8605002 100755
--- a/testbot/scripts/TestAgent
+++ b/testbot/scripts/TestAgent
@@ -34,6 +34,9 @@ sub BEGIN
     $::RootDir = $1;
     unshift @INC, "$::RootDir/lib";
   }
+  # We normally get $AgentPort from ConfigLocal.pl.
+  # But don't fail if it's missing.
+  $::BuildEnv = 1 if (!-f "$::RootDir/ConfigLocal.pl");
 }
 
 my $name0 = $0;
@@ -189,6 +192,11 @@ if (!defined $Usage)
         $Usage = 2;
     }
     $AgentPort = $Port if (defined $Port);
+    if (!defined $AgentPort)
+    {
+        error("you must specify the TestAgent port\n");
+        $Usage = 2;
+    }
     if ($TunnelOpt and $TunnelOpt !~ /^ssh:/)
     {
         error("only SSH tunnels are supported\n");




More information about the wine-cvs mailing list