mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 08:48:31 -05:00
ea449b5bfe
CONFIG_MODULE_TESTS=y build option can now be used to build in module tests into hostapd and wpa_supplicant binaries. These test cases will be used to get better testing coverage for various details that are difficult to test otherwise through the control interface control. A single control interface command is used to executed these tests within the hwsim test framework. This commit adds just the new mechanism, but no module tests are yet integrated into this mechanism. Signed-off-by: Jouni Malinen <j@w1.fi>
21 lines
594 B
Python
21 lines
594 B
Python
#!/usr/bin/python
|
|
#
|
|
# Module tests
|
|
# Copyright (c) 2014, Jouni Malinen <j@w1.fi>
|
|
#
|
|
# This software may be distributed under the terms of the BSD license.
|
|
# See README for more details.
|
|
|
|
import hostapd
|
|
|
|
def test_module_wpa_supplicant(dev):
|
|
"""wpa_supplicant module tests"""
|
|
if "OK" not in dev[0].global_request("MODULE_TESTS"):
|
|
raise Exception("Module tests failed")
|
|
|
|
def test_module_hostapd(dev):
|
|
"""hostapd module tests"""
|
|
hapd_global = hostapd.HostapdGlobal()
|
|
if "OK" not in hapd_global.ctrl.request("MODULE_TESTS"):
|
|
raise Exception("Module tests failed")
|