aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJanusz Dziedzic <janusz.dziedzic@tieto.com>2016-04-07 05:38:07 (GMT)
committerJouni Malinen <j@w1.fi>2016-04-24 17:16:29 (GMT)
commitc8ef2f6ef429c6a2aeeda7ad96060ff85276a42e (patch)
treecbcd7059ce4cccf88ac27a1ff569765764c95d04 /tests
parent3b3e26875a1201a2564b379104067f922dd8d270 (diff)
downloadhostap-c8ef2f6ef429c6a2aeeda7ad96060ff85276a42e.zip
hostap-c8ef2f6ef429c6a2aeeda7ad96060ff85276a42e.tar.gz
hostap-c8ef2f6ef429c6a2aeeda7ad96060ff85276a42e.tar.bz2
tests: Pass apdev to HostapdGlobal() in ap_add_with_driver
This is needed for running the test with a remote host. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/hwsim/test_ap_dynamic.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/hwsim/test_ap_dynamic.py b/tests/hwsim/test_ap_dynamic.py
index 7dab735..7cf0551 100644
--- a/tests/hwsim/test_ap_dynamic.py
+++ b/tests/hwsim/test_ap_dynamic.py
@@ -443,9 +443,14 @@ def test_ap_multi_bss(dev, apdev):
def test_ap_add_with_driver(dev, apdev):
"""Add hostapd interface with driver specified"""
ifname = apdev[0]['ifname']
- hapd_global = hostapd.HostapdGlobal()
+ try:
+ hostname = apdev[0]['hostname']
+ except:
+ hostname = None
+ hapd_global = hostapd.HostapdGlobal(apdev[0])
hapd_global.add(ifname, driver="nl80211")
- hapd = hostapd.Hostapd(ifname)
+ port = hapd_global.get_ctrl_iface_port(ifname)
+ hapd = hostapd.Hostapd(ifname, hostname, port)
hapd.set_defaults()
hapd.set("ssid", "dynamic")
hapd.enable()