[openstack-dev] ipdb debugging in Neutron test cases?
Roman Podolyaka
rpodolyaka at mirantis.com
Wed Jul 17 07:30:30 UTC 2013
Hi,
Indeed, stable/grizzly contains the following code in the base test case
class (quantum/tests/base.py):
if os.environ.get('OS_STDOUT_NOCAPTURE') not in TRUE_STRING:
stdout = self.useFixture(fixtures.StringStream('stdout')).stream
self.useFixture(fixtures.MonkeyPatch('sys.stdout', stdout))
so stdout is captured by default, and you should use OS_STDOUT_NOCAPTURE=1
instead.
The behavior was changed in this commit
https://github.com/openstack/neutron/commit/91bd4bbaeac37d12e61c9c7b033f55ec9f1ab562
.
Thanks,
Roman
On Wed, Jul 17, 2013 at 8:44 AM, Qiu Yu <unicell at gmail.com> wrote:
> On Wed, Jul 17, 2013 at 12:00 PM, Roman Podolyaka
> <rpodolyaka at mirantis.com> wrote:
> > Hi,
> >
> > Ensure that stdout isn't captured by the corresponding fixture:
> >
> > OS_STDOUT_CAPTURE=0 python -m testtools.run
> >
> neutron.tests.unit.openvswitch.test_ovs_neutron_agent.TestOvsNeutronAgent.test_port_update
> > Tests running...
>
> Thanks Roman, ipdb works fine with test cases in Neutron master
> branch. And if you run 'python -m testtools.run {testcase}', stdout is
> not captured by default.
>
> However, the issue still exists with Neutron stable/grizzly branch,
> even with OS_STDOUT_CAPTURE=0. Not quite sure which change in trunk
> resolved this issue.
>
> Thanks,
> --
> Qiu Yu
>
> _______________________________________________
> 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/20130717/4c4b472f/attachment.html>
More information about the OpenStack-dev
mailing list