diff options
Diffstat (limited to 'test-cli/test/tests/qwifi.py')
-rw-r--r-- | test-cli/test/tests/qwifi.py | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/test-cli/test/tests/qwifi.py b/test-cli/test/tests/qwifi.py index b0b8d6b..684cb34 100644 --- a/test-cli/test/tests/qwifi.py +++ b/test-cli/test/tests/qwifi.py @@ -6,12 +6,11 @@ import re class Qwifi(unittest.TestCase): __serverip = None __numbytestx = None - __bind = None __bwexpected = None __port = None params = None - # varlist content: serverip, bwexpected, port, (optional)bind + # varlist content: serverip, bwexpected, port def __init__(self, testname, testfunc, varlist): self.params = varlist super(Qwifi, self).__init__(testfunc) @@ -27,10 +26,6 @@ class Qwifi(unittest.TestCase): self.__port = varlist["port"] else: raise Exception('port param inside Qwifi must be defined') - if "bind" in varlist: - self.__bind = varlist["bind"] - else: - self.__bind = None self.__numbytestx = "10M" self._testMethodDoc = testname @@ -50,12 +45,12 @@ class Qwifi(unittest.TestCase): p.stdout.decode('ascii')) if result: # execute iperf command against the server - if self.__bind is None: - p = sh.iperf("-c", self.__serverip, "-x", "CMSV", "-n", self.__numbytestx, "-f", "m", "-p", - self.__port) - else: + try: p = sh.iperf("-c", self.__serverip, "-x", "CMSV", "-n", self.__numbytestx, "-f", "m", "-p", - self.__port, "-B", self.__bind) + self.__port, _timeout=20) + except sh.TimeoutException: + self.fail("failed: iperf timeout reached") + # check if it was executed succesfully if p.exit_code == 0: if p.stdout == "": |