tests: Check for exceptions during TEST-START/STOP
It looks like the NOTE commands can time out in some cases. Avoid stopping the test run in such a case to get more coverage if this is a temporary issue. Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
76d320ef3f
commit
4896ddaea1
1 changed files with 10 additions and 2 deletions
|
@ -90,7 +90,11 @@ def main():
|
||||||
if t.__doc__:
|
if t.__doc__:
|
||||||
print "Test: " + t.__doc__
|
print "Test: " + t.__doc__
|
||||||
for d in dev:
|
for d in dev:
|
||||||
|
try:
|
||||||
d.request("NOTE TEST-START " + t.__name__)
|
d.request("NOTE TEST-START " + t.__name__)
|
||||||
|
except Exception, e:
|
||||||
|
print "Failed to issue TEST-START before " + t.__name__ + " for " + d.ifname
|
||||||
|
print e
|
||||||
try:
|
try:
|
||||||
if t.func_code.co_argcount > 1:
|
if t.func_code.co_argcount > 1:
|
||||||
t(dev, apdev)
|
t(dev, apdev)
|
||||||
|
@ -103,7 +107,11 @@ def main():
|
||||||
failed.append(t.__name__)
|
failed.append(t.__name__)
|
||||||
print "FAIL " + t.__name__
|
print "FAIL " + t.__name__
|
||||||
for d in dev:
|
for d in dev:
|
||||||
|
try:
|
||||||
d.request("NOTE TEST-STOP " + t.__name__)
|
d.request("NOTE TEST-STOP " + t.__name__)
|
||||||
|
except Exception, e:
|
||||||
|
print "Failed to issue TEST-STOP after " + t.__name__ + " for " + d.ifname
|
||||||
|
print e
|
||||||
|
|
||||||
if not test_filter:
|
if not test_filter:
|
||||||
reset_devs(dev, apdev)
|
reset_devs(dev, apdev)
|
||||||
|
|
Loading…
Reference in a new issue