Module: tools
Branch: master
Commit: d800172f550c5c310e17b823de78c42f2a835b25
URL: http://source.winehq.org/git/tools.git/?a=commit;h=d800172f550c5c310e17b823…
Author: Francois Gouget <fgouget(a)free.fr>
Date: Thu Apr 7 12:34:32 2016 +0200
testbot/TestAgent: Fix the --keepalive check.
Signed-off-by: Francois Gouget <fgouget(a)free.fr>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/scripts/TestAgent | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/testbot/scripts/TestAgent b/testbot/scripts/TestAgent
index ced1165..33fc298 100755
--- a/testbot/scripts/TestAgent
+++ b/testbot/scripts/TestAgent
@@ -245,7 +245,7 @@ if (!defined $Usage)
$Usage = 2;
}
elsif ($Cmd ne "run" and ($RunFlags or defined $RunIn or defined $RunOut or
- defined $RunErr or defined $Keepalive))
+ defined $RunErr))
{
error("the --run-xxx options can only be used with the run command\n");
$Usage = 2;
@@ -274,6 +274,11 @@ if (!defined $Usage)
error("you must specify the server files to delete\n");
$Usage = 2;
}
+ if (defined $Keepalive and $Cmd !~ /^(?:run|wait)$/)
+ {
+ error("--keepalive can only be used with the run or wait commands\n");
+ $Usage = 2;
+ }
$Keepalive = 60 if (!defined $Keepalive);
$AgentPort = $Port if (defined $Port);
if (!defined $AgentPort)