commit 2d7765cad0d30e83ffca61d309871da52dbfe091
Author: Ondrej Lichtner <olichtne(a)redhat.com>
Date: Fri Feb 8 11:09:49 2013 +0100
TestIperf: bind option not specified bug
When the module is run in the 'server' role and the option 'bind' is
not
specified, the constructed command contains 'None' instead, creating an
invalid command.
This commit fixes that.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
test_modules/TestIperf.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/test_modules/TestIperf.py b/test_modules/TestIperf.py
index 0a9b047..462c48c 100644
--- a/test_modules/TestIperf.py
+++ b/test_modules/TestIperf.py
@@ -26,7 +26,10 @@ class TestIperf(TestGeneric):
cmd = "iperf --%s %s -t %s %s" % (role, iperf_server,
self.duration, iperf_options)
elif role == "server":
bind = self.get_opt("bind", opt_type="addr")
- cmd = "iperf --%s -B %s %s" % (role, bind, iperf_options)
+ if bind != None:
+ cmd = "iperf --%s -B %s %s" % (role, bind, iperf_options)
+ else:
+ cmd = "iperf --%s %s" % (role, iperf_options)
return cmd
Show replies by date