summaryrefslogtreecommitdiff
path: root/scripts/PYTHON_SOFTWARE/test/tests/qethernet.py
diff options
context:
space:
mode:
authorManel Caro <mcaro@iseebcn.com>2019-03-09 21:29:27 +0100
committerManel Caro <mcaro@iseebcn.com>2019-03-09 21:29:27 +0100
commite4366bb1f2dc3a43a1289f6f76967f1005278954 (patch)
tree4f07744ecfb6c6a60e29e35ca17d93b52f8b5d45 /scripts/PYTHON_SOFTWARE/test/tests/qethernet.py
parent9332c933fc05f42882640c9a4e35fab09854af84 (diff)
downloadboard-e4366bb1f2dc3a43a1289f6f76967f1005278954.zip
board-e4366bb1f2dc3a43a1289f6f76967f1005278954.tar.gz
board-e4366bb1f2dc3a43a1289f6f76967f1005278954.tar.bz2
Remove incorrect copy PYTHON_SOFTWARE folder inside scripts directory
Diffstat (limited to 'scripts/PYTHON_SOFTWARE/test/tests/qethernet.py')
-rw-r--r--scripts/PYTHON_SOFTWARE/test/tests/qethernet.py57
1 files changed, 0 insertions, 57 deletions
diff --git a/scripts/PYTHON_SOFTWARE/test/tests/qethernet.py b/scripts/PYTHON_SOFTWARE/test/tests/qethernet.py
deleted file mode 100644
index 2ac447c..0000000
--- a/scripts/PYTHON_SOFTWARE/test/tests/qethernet.py
+++ /dev/null
@@ -1,57 +0,0 @@
-from test.helpers.syscmd import SysCommand
-import unittest
-
-
-class Qethernet(unittest.TestCase):
- __sip = None
- __raw_out = None
- __MB_req = None
- __MB_real = None
- __BW_real = None
- __dat_list = None
- __bind = None
- __OKBW = None
-
- def __init__(self, testname, testfunc, sip = None, OKBW=100, bind=None):
- super(Qethernet, self).__init__(testfunc)
- if sip is not None:
- self.__sip = sip
- if sip is not None:
- self.__bind = bind
- self.__MB_req = '10'
- self.__OKBW=OKBW
- self._testMethodDoc = testname
-
- def execute(self):
- print
- if self.__bind is None:
- str_cmd = "iperf -c {} -x CMSV -n {}M".format(self.__sip, self.__MB_req)
- else:
- str_cmd = "iperf -c {} -x CMSV -n {}M -B {}".format(self.__sip, self.__MB_req, self.__bind)
- iperf_command = SysCommand("iperf", str_cmd)
- if iperf_command.execute() == 0:
- self.__raw_out = iperf_command.getOutput()
- if self.__raw_out == "":
- return -1
- lines = iperf_command.getOutput().splitlines()
- dat = lines[1]
- dat = dat.decode('ascii')
- dat_list = dat.split( )
- for d in dat_list:
- a = dat_list.pop(0)
- if a == "sec":
- break
- self.__MB_real = dat_list[0]
- self.__BW_real = dat_list[2]
- self.__dat_list = dat_list
- #print(self.__MB_real)
- #print(self.__BW_real)
- self.failUnless(float(self.__BW_real)>float(self.__OKBW)*0.9,"failed: speed is lower than spected. Speed(MB/s)" + str(self.__BW_real))
- else:
- self.fail("failed: could not complete iperf command")
-
- def get_Total_MB(self):
- return self.__MB_real;
-
- def get_Total_BW(self):
- return self.__MB_real;