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

Francois Gouget fgouget at codeweavers.com
Mon Jan 21 21:01:53 CST 2013


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 file changed, 8 insertions(+)

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");
-- 
1.7.10.4




More information about the wine-patches mailing list