tests: Skip sigma_dut tests for SAE/DPP based on build capabilities

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2017-12-28 00:16:53 +02:00
parent 133f8d09fc
commit 6e6651d02e

View file

@ -597,6 +597,8 @@ def test_sigma_dut_ap_override_rsne(dev, apdev):
def test_sigma_dut_ap_sae(dev, apdev): def test_sigma_dut_ap_sae(dev, apdev):
"""sigma_dut controlled AP with SAE""" """sigma_dut controlled AP with SAE"""
if "SAE" not in dev[0].get_capability("auth_alg"):
raise HwsimSkip("SAE not supported")
with HWSimRadio() as (radio, iface): with HWSimRadio() as (radio, iface):
sigma = start_sigma_dut(iface) sigma = start_sigma_dut(iface)
try: try:
@ -617,6 +619,8 @@ def test_sigma_dut_ap_sae(dev, apdev):
def test_sigma_dut_ap_sae_password(dev, apdev): def test_sigma_dut_ap_sae_password(dev, apdev):
"""sigma_dut controlled AP with SAE and long password""" """sigma_dut controlled AP with SAE and long password"""
if "SAE" not in dev[0].get_capability("auth_alg"):
raise HwsimSkip("SAE not supported")
with HWSimRadio() as (radio, iface): with HWSimRadio() as (radio, iface):
sigma = start_sigma_dut(iface) sigma = start_sigma_dut(iface)
try: try:
@ -637,6 +641,8 @@ def test_sigma_dut_ap_sae_password(dev, apdev):
def test_sigma_dut_ap_sae_group(dev, apdev): def test_sigma_dut_ap_sae_group(dev, apdev):
"""sigma_dut controlled AP with SAE and specific group""" """sigma_dut controlled AP with SAE and specific group"""
if "SAE" not in dev[0].get_capability("auth_alg"):
raise HwsimSkip("SAE not supported")
with HWSimRadio() as (radio, iface): with HWSimRadio() as (radio, iface):
sigma = start_sigma_dut(iface) sigma = start_sigma_dut(iface)
try: try:
@ -657,6 +663,8 @@ def test_sigma_dut_ap_sae_group(dev, apdev):
def test_sigma_dut_ap_psk_sae(dev, apdev): def test_sigma_dut_ap_psk_sae(dev, apdev):
"""sigma_dut controlled AP with PSK+SAE""" """sigma_dut controlled AP with PSK+SAE"""
if "SAE" not in dev[0].get_capability("auth_alg"):
raise HwsimSkip("SAE not supported")
with HWSimRadio() as (radio, iface): with HWSimRadio() as (radio, iface):
sigma = start_sigma_dut(iface) sigma = start_sigma_dut(iface)
try: try:
@ -1356,6 +1364,7 @@ def test_sigma_dut_ap_dpp_qr_legacy_psk(dev, apdev, params):
extra="psk=%s" % (32*"12")) extra="psk=%s" % (32*"12"))
def run_sigma_dut_ap_dpp_qr(dev, apdev, params, ap_conf, sta_conf, extra=""): def run_sigma_dut_ap_dpp_qr(dev, apdev, params, ap_conf, sta_conf, extra=""):
check_dpp_capab(dev[0])
logdir = os.path.join(params['logdir'], "sigma_dut_ap_dpp_qr.sigma-hostapd") logdir = os.path.join(params['logdir'], "sigma_dut_ap_dpp_qr.sigma-hostapd")
with HWSimRadio() as (radio, iface): with HWSimRadio() as (radio, iface):
sigma = start_sigma_dut(iface, hostapd_logdir=logdir) sigma = start_sigma_dut(iface, hostapd_logdir=logdir)
@ -1416,6 +1425,7 @@ def run_sigma_dut_ap_dpp_qr(dev, apdev, params, ap_conf, sta_conf, extra=""):
def test_sigma_dut_ap_dpp_pkex_responder(dev, apdev, params): def test_sigma_dut_ap_dpp_pkex_responder(dev, apdev, params):
"""sigma_dut controlled AP as DPP PKEX responder""" """sigma_dut controlled AP as DPP PKEX responder"""
check_dpp_capab(dev[0])
logdir = os.path.join(params['logdir'], logdir = os.path.join(params['logdir'],
"sigma_dut_ap_dpp_pkex_responder.sigma-hostapd") "sigma_dut_ap_dpp_pkex_responder.sigma-hostapd")
with HWSimRadio() as (radio, iface): with HWSimRadio() as (radio, iface):