From: Janusz Dziedzic Date: Thu, 7 Apr 2016 05:38:00 +0000 (+0200) Subject: tests: Pass apdev to hostapd.terminate() X-Git-Tag: hostap_2_6~562 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=369f712a401ce117dd7f1d5324a68608f851b387;p=thirdparty%2Fhostap.git 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 --- diff --git a/tests/hwsim/hostapd.py b/tests/hwsim/hostapd.py index 6becb8ed8..931c66640 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()