From 4896ddaea1a2cde405e21c4ba7827f91bdbfda17 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 24 Aug 2013 19:41:08 +0300 Subject: [PATCH] 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 --- tests/hwsim/run-tests.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/hwsim/run-tests.py b/tests/hwsim/run-tests.py index 364115a1a..e7796cfe9 100755 --- a/tests/hwsim/run-tests.py +++ b/tests/hwsim/run-tests.py @@ -90,7 +90,11 @@ def main(): if t.__doc__: print "Test: " + t.__doc__ for d in dev: - d.request("NOTE TEST-START " + t.__name__) + try: + 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: if t.func_code.co_argcount > 1: t(dev, apdev) @@ -103,7 +107,11 @@ def main(): failed.append(t.__name__) print "FAIL " + t.__name__ for d in dev: - d.request("NOTE TEST-STOP " + t.__name__) + try: + 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: reset_devs(dev, apdev)