Browse Source

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 <johannes.berg@intel.com>
Johannes Berg 9 years ago
parent
commit
1a4f18d8f4
1 changed files with 5 additions and 0 deletions
  1. 5 0
      tests/hwsim/run-tests.py

+ 5 - 0
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: