mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-01-31 21:34:09 +01:00
autotests: test1AP: fix hw.conf for test-runner
This commit is contained in:
parent
f76a86d2b0
commit
6a4f24c920
@ -32,7 +32,8 @@ class TestAPShutdown(unittest.TestCase):
|
||||
stdout_handle.close()
|
||||
os.close(slave)
|
||||
|
||||
networkToConnect = utility.getNetworkToConnectTo(objectList)
|
||||
networkToConnect = utility.getNetworkToConnectTo(objectList,
|
||||
"IntelWIFI")
|
||||
# check if networkToConnect is not null. If yes, restart program
|
||||
# so that the network list is updated. Alternatively, we can scan
|
||||
# for networks.
|
||||
@ -58,10 +59,10 @@ class TestAPShutdown(unittest.TestCase):
|
||||
"IntelWIFI")
|
||||
|
||||
#kill AP
|
||||
pid_bytes = check_output("pgrep hostapd", shell=True)
|
||||
pid_bytes = check_output("pgrep -o -x hostapd", shell=True)
|
||||
pid = pid_bytes.decode('utf-8')
|
||||
logger.debug("shutting down AP with pid: %s", pid)
|
||||
os.system("kill %d"%int(pid))
|
||||
os.system("kill " + pid)
|
||||
|
||||
#should not be connected to any network after AP shutdown
|
||||
logger.info("After AP shutdown, connected to: %s",
|
||||
@ -82,6 +83,7 @@ class TestAPShutdown(unittest.TestCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
global logger, bus, mainloop
|
||||
os.system("rm -rf /var/lib/iwd")
|
||||
utility.initLogger()
|
||||
logger = logging.getLogger(__name__)
|
||||
bus = dbus.SystemBus()
|
||||
|
@ -1,6 +1,3 @@
|
||||
interface=wln0
|
||||
driver=nl80211
|
||||
|
||||
hw_mode=g
|
||||
channel=1
|
||||
ssid=IntelWIFI
|
||||
|
@ -1,6 +1,3 @@
|
||||
interface=wln0
|
||||
driver=nl80211
|
||||
|
||||
hw_mode=g
|
||||
channel=1
|
||||
ssid=IntelWIFI
|
||||
|
@ -31,7 +31,8 @@ class TestConnectDisconnect(unittest.TestCase):
|
||||
stdout_handle.close()
|
||||
os.close(slave)
|
||||
|
||||
networkToConnect = utility.getNetworkToConnectTo(objectList)
|
||||
networkToConnect = utility.getNetworkToConnectTo(objectList,
|
||||
"IntelWIFI")
|
||||
# check if networkToConnect is not null. If yes, restart program
|
||||
# so that the network list is updated. Alternatively, we can scan
|
||||
# for networks.
|
||||
|
@ -1,5 +1,6 @@
|
||||
[SETUP]
|
||||
num_radios=2
|
||||
num_radios=3
|
||||
|
||||
[HOSTAPD]
|
||||
rad0=IntelWIFI.conf
|
||||
rad0=IntelWIFI_TKIP.conf
|
||||
rad1=invalidPassphrase.conf
|
||||
|
@ -1,9 +1,6 @@
|
||||
interface=wln0
|
||||
driver=nl80211
|
||||
|
||||
hw_mode=g
|
||||
channel=1
|
||||
ssid=IntelWIFI
|
||||
ssid=IntelWIFI_WrongPW
|
||||
|
||||
wpa=1
|
||||
wpa_pairwise=TKIP
|
||||
|
@ -9,6 +9,7 @@ import logging
|
||||
import os
|
||||
from subprocess import Popen, PIPE, STDOUT
|
||||
import sys
|
||||
import subprocess
|
||||
sys.path.append('../utility') #needed to import all the utility modules
|
||||
import utility
|
||||
import pty
|
||||
@ -31,7 +32,8 @@ class TestInvalidPassphrase(unittest.TestCase):
|
||||
stdout_handle.close()
|
||||
os.close(slave)
|
||||
|
||||
networkToConnect = utility.getNetworkToConnectTo(objectList)
|
||||
networkToConnect = utility.getNetworkToConnectTo(objectList,
|
||||
"IntelWIFI_WrongPW")
|
||||
# check if networkToConnect is not null. If yes, restart program
|
||||
# so that the network list is updated. Alternatively, we can scan
|
||||
# for networks.
|
||||
@ -66,6 +68,7 @@ class TestInvalidPassphrase(unittest.TestCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
global logger, bus, mainloop
|
||||
os.system("rm -rf /var/lib/iwd")
|
||||
utility.initLogger()
|
||||
logger = logging.getLogger(__name__)
|
||||
bus = dbus.SystemBus()
|
||||
|
@ -23,7 +23,8 @@ class TestScanNetwork(unittest.TestCase):
|
||||
os.execl(sys.executable, sys.executable, * sys.argv)
|
||||
|
||||
logger.info("Network Found: %s", networkName)
|
||||
self.assertEqual(networkName, "IntelWIFI")
|
||||
networkListToMatch = ["IntelWIFI", "IntelWIFI_WrongPW"]
|
||||
self.assertIn(networkName, networkListToMatch)
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
|
Loading…
Reference in New Issue
Block a user