aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJanusz Dziedzic <janusz.dziedzic@tieto.com>2016-04-07 05:38:00 (GMT)
committerJouni Malinen <j@w1.fi>2016-04-24 08:51:06 (GMT)
commit369f712a401ce117dd7f1d5324a68608f851b387 (patch)
treee774cef8af5c39d60e5a4ca3ef6569558f405136 /tests
parentc92ee957ca1d710d75a4c67cb345111431cd19f2 (diff)
downloadhostap-369f712a401ce117dd7f1d5324a68608f851b387.zip
hostap-369f712a401ce117dd7f1d5324a68608f851b387.tar.gz
hostap-369f712a401ce117dd7f1d5324a68608f851b387.tar.bz2
tests: Pass apdev to hostapd.terminate()
Pass apdev dictionary to hostapd.terminate() to support operation with a remote test host. Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/hwsim/hostapd.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/hwsim/hostapd.py b/tests/hwsim/hostapd.py
index 6becb8e..931c666 100644
--- a/tests/hwsim/hostapd.py
+++ b/tests/hwsim/hostapd.py
@@ -422,8 +422,15 @@ def remove_bss(apdev, ifname=None):
hapd_global = HostapdGlobal(hostname=hostname, port=port)
hapd_global.remove(ifname)
-def terminate(hostname=None, port=8878):
- logger.info("Terminating hostapd")
+def terminate(apdev):
+ try:
+ hostname = apdev['hostname']
+ port = apdev['port']
+ logger.info("Terminating hostapd " + apdev['hostname'] + "/" + apdev['port'])
+ except:
+ hostname = None
+ port = 8878
+ logger.info("Terminating hostapd")
hapd_global = HostapdGlobal(hostname=hostname, port=port)
hapd_global.terminate()