[openstack-dev] How to debug test using pdb

Steve Martinelli stevemar at ca.ibm.com
Mon Dec 1 18:32:05 UTC 2014


Link to the docs for the debugger script:
  
http://docs.openstack.org/developer/oslotest/features.html#debugging-with-oslo-debug-helper

We have support for it in some of the Keystone related projects and folks
seem to find it useful. If may not fit your needs, but as Ben suggested,
give it a whirl, it should help.

Steve

Ben Nemec <openstack at nemebean.com> wrote on 12/01/2014 01:19:17 PM:

> From: Ben Nemec <openstack at nemebean.com>
> To: "OpenStack Development Mailing List (not for usage questions)" 
> <openstack-dev at lists.openstack.org>
> Date: 12/01/2014 01:25 PM
> Subject: Re: [openstack-dev] How to debug test using pdb
> 
> I don't personally use the debugger much, but there is a helper script
> that is supposed to allow debugging:
> 
https://github.com/openstack/oslotest/blob/master/tools/oslo_debug_helper
> 
> On 11/30/2014 05:08 AM, Saju M wrote:
> > Hi,
> > 
> > How to debug test using pdb
> > 
> > I want to debug tests and tried following methods, but didn't work
> > (could not see pdb> console).
> > I could see only the message "Tests running..." and command got stuck.
> > 
> > I tried this with python-neutronclient, that does not have run_test.sh
> > 
> > Method-1:
> > #source .tox/py27/bin/activate
> > #.tox/py27/bin/python -m testtools.run
> > 
> 
neutronclient.tests.unit.test_cli20_network.CLITestV20NetworkJSON.test_create_network
> > 
> > Method-2:
> > #testr list-tests '(CLITestV20NetworkJSON.test_create_network)' > 
my-list
> > #python -m testtools.run discover --load-list my-list
> > 
> > 
> > 
> > 
> > 
> > _______________________________________________
> > OpenStack-dev mailing list
> > OpenStack-dev at lists.openstack.org
> > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> > 
> 
> 
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20141201/924ac098/attachment.html>


More information about the OpenStack-dev mailing list