testbot/TestAgent: Fix the TestAgent script parameter checks.
Francois Gouget
fgouget at codeweavers.com
Tue Dec 11 05:08:55 CST 2012
---
Don't use $Cmd if it is not set.
testbot/scripts/TestAgent | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/testbot/scripts/TestAgent b/testbot/scripts/TestAgent
index b861ba2..6d241b5 100755
--- a/testbot/scripts/TestAgent
+++ b/testbot/scripts/TestAgent
@@ -167,25 +167,25 @@ if (!defined $Usage)
error("you must specify a command\n");
$Usage = 2;
}
- elsif ($Cmd eq "run" and !@Run)
+ elsif ($Cmd ne "sendfile" and $SendFlags)
{
- error("you must specify the command to run\n");
+ error("the --sendfile-xxx options can only be used with the sendfile command\n");
$Usage = 2;
}
- elsif ($Cmd eq "rm" and !@Rm)
+ elsif ($Cmd eq "run" and !@Run)
{
- error("you must specify the server files to delete\n");
+ error("you must specify the command to run\n");
$Usage = 2;
}
- if ($Cmd ne "run" and ($RunFlags or defined $RunIn or defined $RunOut or
+ elsif ($Cmd ne "run" and ($RunFlags or defined $RunIn or defined $RunOut or
defined $RunErr))
{
error("the --run-xxx options can only be used with the run command\n");
$Usage = 2;
}
- elsif ($Cmd ne "sendfile" and $SendFlags)
+ elsif ($Cmd eq "rm" and !@Rm)
{
- error("the --sendfile-xxx options can only be used with the sendfile command\n");
+ error("you must specify the server files to delete\n");
$Usage = 2;
}
$AgentPort = $Port if (defined $Port);
--
1.7.10.4
More information about the wine-patches
mailing list