[Libvirt-cim] [PATCH] [TEST] Add stack trace on error to make test case development easier

Dan Smith danms at us.ibm.com
Mon Jul 28 15:24:49 UTC 2008


# HG changeset patch
# User Dan Smith <danms at us.ibm.com>
# Date 1217258680 25200
# Node ID cf3ab249243b02c259aa63f7cc69d0b3983c176d
# Parent  d1fb0dfbebaa98fd1e7fbcca1ce29dfb1bf44568
[TEST] Add stack trace on error to make test case development easier

Signed-off-by: Dan Smith <danms at us.ibm.com>

diff -r d1fb0dfbebaa -r cf3ab249243b lib/CimTest/Globals.py
--- a/lib/CimTest/Globals.py	Mon Jul 28 08:24:25 2008 -0700
+++ b/lib/CimTest/Globals.py	Mon Jul 28 08:24:40 2008 -0700
@@ -25,6 +25,7 @@
 import os
 import logging
 from optparse import OptionParser
+import traceback
 
 global CIM_USER
 global CIM_PASS
@@ -143,6 +144,7 @@
                     rc = f()
                 except Exception, e:
                     logger.error('%s : %s' % (e.__class__.__name__, e))
+		    logger.error("%s" % traceback.print_exc())
                     rc = FAIL
                 return rc
             setattr(do_try, 'options', options)




More information about the Libvirt-cim mailing list