From 1a4f18d8f4487d603b5d1fb09305a62f307af5b9 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Fri, 27 Nov 2015 19:54:58 +0100 Subject: [PATCH] tests: run-tests: Print more details about NameError If encountering a NameError, print the entire traceback so that it's actually debuggable. Signed-off-by: Johannes Berg --- tests/hwsim/run-tests.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/hwsim/run-tests.py b/tests/hwsim/run-tests.py index c55ed8323..ec3281273 100755 --- a/tests/hwsim/run-tests.py +++ b/tests/hwsim/run-tests.py @@ -453,6 +453,11 @@ def main(): except HwsimSkip, e: logger.info("Skip test case: %s" % e) result = "SKIP" + except NameError, e: + import traceback + logger.info(e) + traceback.print_exc() + result = "FAIL" except Exception, e: logger.info(e) if args.loglevel == logging.WARNING: