diff mbox

[v2,12/17] tests: print traceback when test failed

Message ID 1460007495-17921-12-git-send-email-janusz.dziedzic@tieto.com
State Accepted
Headers show

Commit Message

Janusz.Dziedzic@tieto.com April 7, 2016, 5:38 a.m. UTC
This is usefull in case we will hit the
problem in test code.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
---
 tests/hwsim/run-tests.py | 2 ++
 1 file changed, 2 insertions(+)
diff mbox

Patch

diff --git a/tests/hwsim/run-tests.py b/tests/hwsim/run-tests.py
index ec32812..1cb86b7 100755
--- a/tests/hwsim/run-tests.py
+++ b/tests/hwsim/run-tests.py
@@ -459,7 +459,9 @@  def main():
                 traceback.print_exc()
                 result = "FAIL"
             except Exception, e:
+                import traceback
                 logger.info(e)
+                traceback.print_exc()
                 if args.loglevel == logging.WARNING:
                     print "Exception: " + str(e)
                 result = "FAIL"