summaryrefslogtreecommitdiff
path: root/test-cli/test/tests/qethernet.py
diff options
context:
space:
mode:
Diffstat (limited to 'test-cli/test/tests/qethernet.py')
-rw-r--r--test-cli/test/tests/qethernet.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/test-cli/test/tests/qethernet.py b/test-cli/test/tests/qethernet.py
index 22d796c..adee67f 100644
--- a/test-cli/test/tests/qethernet.py
+++ b/test-cli/test/tests/qethernet.py
@@ -4,26 +4,26 @@ import re
class Qethernet(unittest.TestCase):
- __sip = None
+ __serverip = None
__numbytestx = None
__bind = None
- __OKBW = None
+ __bwexpected = None
__port = None
def __init__(self, testname, testfunc, varlist):
super(Qethernet, self).__init__(testfunc)
- if "sip" in varlist:
- self.__sip = varlist["sip"]
+ if "serverip" in varlist:
+ self.__serverip = varlist["serverip"]
else:
raise Exception('sip param inside Qethernet have been be defined')
if "bind" in varlist:
self.__bind = varlist["bind"]
else:
self.__bind = None
- if "OKBW" in varlist:
- self.__OKBW = varlist["OKBW"]
+ if "bwexpected" in varlist:
+ self.__bwexpected = varlist["bwexpected"]
else:
- raise Exception('OKBW param inside Qethernet must be defined')
+ raise Exception('bwexpected param inside Qethernet must be defined')
if "port" in varlist:
self.__port = varlist["port"]
else:
@@ -34,9 +34,9 @@ class Qethernet(unittest.TestCase):
def execute(self):
# execute iperf command against the server
if self.__bind is None:
- p = sh.iperf("-c", self.__sip, "-x", "CMSV", "-n", self.__numbytestx, "-f", "m", "-p", self.__port)
+ p = sh.iperf("-c", self.__serverip, "-x", "CMSV", "-n", self.__numbytestx, "-f", "m", "-p", self.__port)
else:
- p = sh.iperf("-c", self.__sip, "-x", "CMSV", "-n", self.__numbytestx, "-f", "m", "-p", self.__port, "-B",
+ p = sh.iperf("-c", self.__serverip, "-x", "CMSV", "-n", self.__numbytestx, "-f", "m", "-p", self.__port, "-B",
self.__bind)
# check if it was executed succesfully
if p.exit_code == 0:
@@ -53,7 +53,7 @@ class Qethernet(unittest.TestCase):
bwreal = b[0]
# check if BW is in the expected range
- self.failUnless(float(bwreal) > float(self.__OKBW) * 0.9,
+ self.failUnless(float(bwreal) > float(self.__bwexpected) * 0.9,
"failed: speed is lower than spected. Speed(MB/s)" + str(bwreal))
else:
self.fail("failed: could not complete iperf command")