summaryrefslogtreecommitdiff
path: root/test-cli/test/tests/qwifi.py
diff options
context:
space:
mode:
authorHector Fernandez <hector@iatec.biz>2020-04-16 17:09:19 +0200
committerHector Fernandez <hector@iatec.biz>2020-04-16 17:09:19 +0200
commit6a680137694233008005415e22cf889b85baa292 (patch)
treeb0b1c68dab8a76383e18c4d16f231f6171524ea2 /test-cli/test/tests/qwifi.py
parent9f613e33f27f772682ab7d7bd2261a9c4bd014c5 (diff)
downloadboard-6a680137694233008005415e22cf889b85baa292.zip
board-6a680137694233008005415e22cf889b85baa292.tar.gz
board-6a680137694233008005415e22cf889b85baa292.tar.bz2
First release
Diffstat (limited to 'test-cli/test/tests/qwifi.py')
-rw-r--r--test-cli/test/tests/qwifi.py17
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 == "":