tests: Convert test skipping to use exception

Instead of returning "skip" from the test function, raise the new
HwsimSkip exception to indicate a test case was skipped.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2015-01-07 14:19:30 +02:00
parent 9c8779daf6
commit 81e787b750
26 changed files with 164 additions and 321 deletions

View file

@ -11,6 +11,7 @@ logger = logging.getLogger()
import hwsim_utils
import hostapd
from utils import HwsimSkip
from wlantest import Wlantest
def check_qos_map(ap, hapd, dev, sta, dscp, tid, ap_tid=None):
@ -36,7 +37,7 @@ def test_ap_qosmap(dev, apdev):
"""QoS mapping"""
drv_flags = dev[0].get_driver_status_field("capa.flags")
if int(drv_flags, 0) & 0x40000000 == 0:
return "skip"
raise HwsimSkip("Driver does not support QoS Map")
ssid = "test-qosmap"
params = { "ssid": ssid }
params['qos_map_set'] = '53,2,22,6,8,15,0,7,255,255,16,31,32,39,255,255,40,47,48,55'