]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: run-tests: Print more details about NameError
authorJohannes Berg <johannes.berg@intel.com>
Fri, 27 Nov 2015 18:54:58 +0000 (19:54 +0100)
committerJouni Malinen <j@w1.fi>
Fri, 27 Nov 2015 22:21:20 +0000 (00:21 +0200)
If encountering a NameError, print the entire traceback so that
it's actually debuggable.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
tests/hwsim/run-tests.py

index c55ed832369810479d3c1baa5370da9e9db9bdfb..ec328127304e90a175f5c2c93911215820847fac 100755 (executable)
@@ -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: