parser.add_argument('--split', help='split tests for parallel execution (<server number>/<total servers>)')
parser.add_argument('--no-reset', action='store_true', dest='no_reset',
help='Do not reset devices at the end of the test')
+ parser.add_argument('--long', action='store_true',
+ help='Include test cases that take long time')
parser.add_argument('-f', dest='testmodules', metavar='<test module>',
help='execute only tests from these test modules',
type=str, choices=[[]] + test_modules, nargs='+')
if t.func_code.co_argcount > 2:
params = {}
params['logdir'] = args.logdir
+ params['long'] = args.long
res = t(dev, apdev, params)
elif t.func_code.co_argcount > 1:
res = t(dev, apdev)
finally:
subprocess.call(['sudo', 'rm', conffile])
+def test_ap_wps_pbc_timeout(dev, apdev, params):
+ """wpa_supplicant PBC walk time [long]"""
+ if not params['long']:
+ logger.info("Skip test case with long duration due to --long not specified")
+ return "skip"
+ ssid = "test-wps"
+ hostapd.add_ap(apdev[0]['ifname'],
+ { "ssid": ssid, "eap_server": "1", "wps_state": "1" })
+ hapd = hostapd.Hostapd(apdev[0]['ifname'])
+ logger.info("Start WPS_PBC and wait for PBC walk time expiration")
+ if "OK" not in dev[0].request("WPS_PBC"):
+ raise Exception("WPS_PBC failed")
+ ev = dev[0].wait_event(["WPS-TIMEOUT"], timeout=150)
+ if ev is None:
+ raise Exception("WPS-TIMEOUT not reported")
+
def add_ssdp_ap(ifname, ap_uuid):
ssid = "wps-ssdp"
ap_pin = "12345670"