[PATCH] tests: run-tests: print more details about NameError

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Johannes Berg <johannes.berg@xxxxxxxxx>

If encountering a NameError, print the entire traceback so that
it's actually debuggable.

Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>
---
 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 c55ed8323698..ec328127304e 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:
-- 
2.6.2


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux