]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Add post-mortem debug option for tests
authorMaru Newby <marun@redhat.com>
Sat, 26 Oct 2013 11:42:09 +0000 (11:42 +0000)
committerMaru Newby <marun@redhat.com>
Tue, 10 Dec 2013 03:56:50 +0000 (03:56 +0000)
commitf3461c76feb0940d1a56d64b1f0a5508151fe95f
tree10838f2211883c8abd4e98b1b262d88f9c7e90b2
parent3014e1e021b3fe59c75daae1734472c3a11582ee
Add post-mortem debug option for tests

Post-mortem debugging, the ability to drop into a debugger with the
execution state that triggered the exception, is very useful in
diagnosing failure conditions.  Our previous test runner, nose,
provided the ability to enable post-mortem debugging on test
failures (via --pdb-failure) and errors (via --pdb).  testr
lacks these options at present, so this change adds support
for enabling post-mortem debugging via an environment variable.
All test-triggered exceptions will result in a post-mortem debugger
being invoked if OS_POST_MORTEM_DEBUG is set to "1" or "True".

Implements: blueprint neutron-pm-debug-on-test-failure
Change-Id: Iddbe1335b059d062c0286df2ad27aef7728461b7
TESTING
neutron/tests/base.py
neutron/tests/post_mortem_debug.py [new file with mode: 0644]
neutron/tests/unit/test_post_mortem_debug.py [new file with mode: 0644]