diff options
author | Manel Caro <mcaro@iseebcn.com> | 2019-03-09 21:29:27 +0100 |
---|---|---|
committer | Manel Caro <mcaro@iseebcn.com> | 2019-03-09 21:29:27 +0100 |
commit | e4366bb1f2dc3a43a1289f6f76967f1005278954 (patch) | |
tree | 4f07744ecfb6c6a60e29e35ca17d93b52f8b5d45 /scripts/PYTHON_SOFTWARE/test/tests/qwifi.py | |
parent | 9332c933fc05f42882640c9a4e35fab09854af84 (diff) | |
download | board-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/qwifi.py')
-rw-r--r-- | scripts/PYTHON_SOFTWARE/test/tests/qwifi.py | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/scripts/PYTHON_SOFTWARE/test/tests/qwifi.py b/scripts/PYTHON_SOFTWARE/test/tests/qwifi.py deleted file mode 100644 index 8235937..0000000 --- a/scripts/PYTHON_SOFTWARE/test/tests/qwifi.py +++ /dev/null @@ -1,44 +0,0 @@ -from test.helpers.syscmd import SysCommand -import unittest -import subprocess - -class Qwifi(unittest.TestCase): - - def __init__(self, testname, testfunc, signal): - super(Qwifi, self).__init__(testfunc) - self.__signal = signal - self._testMethodDoc = testname - # WiFi SERVERIP fixed at the moment. - self._serverip = "192.168.5.1" - - def execute(self): - # First check connection with the wifi server using ping command - #str_cmd = "ping -c 1 {} > /dev/null".format(self._serverip) - #wifi_ping = SysCommand("wifi_ping", str_cmd) - #wifi_ping.execute() - #res = subprocess.call(['ping', '-c', '1', self._serverip]) - p = subprocess.Popen(['ping','-c','1',self._serverip,'-W','2'],stdout=subprocess.PIPE) - p.wait() - res=p.poll() - if res == 0: - str_cmd= "iw wlan0 link" - wifi_stats = SysCommand("wifi_stats", str_cmd) - if wifi_stats.execute() == 0: - w_stats = wifi_stats.getOutput().decode('ascii').splitlines() - #self._longMessage = str(self.__raw_out).replace("'", "") - if not w_stats[0] == "Not connected.": - signal_st = w_stats[5].split(" ")[1] - try: - int(signal_st) - if -1*int(signal_st) > int(self.__signal): - self.fail("failed: signal to server lower than expected") - except ValueError: - self.fail("failed: error output (Bad connection?)") - else: - self.fail("failed: error output (Bad connection?)") - #tx_brate = float(w_stats[6].split(" ")[2]) - else: - self.fail("failed: couldn't execute iw command") - else: - self.fail("failed: ping to server {}".format(self._serverip)) - |