1)
Add following statements in Unit Test Code where you want to debug
import pdb
pdb.set_trace()
2)
Run "run_tests.sh" with "--debug" option
#./run_tests.sh --debug neutron.tests.unit.opencontrail.test_extension_ipam.IpamExtensionTestCase.test_create_ipam
OR
Run the test with "testtools" instead of "testr"
a)
If you are using "run_tests.sh" environment
#source .venv/bin/activate
#.venv/bin/python -m testtools.run neutron.tests.unit.opencontrail.test_extension_ipam.IpamExtensionTestCase.test_create_ipam
b)
If you are using "Tox" environment
#source .tox/py27/bin/activate
#.tox/py27/bin/python -m testtools.run neutron.tests.unit.opencontrail.test_extension_ipam.IpamExtensionTestCase.test_create_ipam
Add following statements in Unit Test Code where you want to debug
import pdb
pdb.set_trace()
2)
Run "run_tests.sh" with "--debug" option
#./run_tests.sh --debug neutron.tests.unit.opencontrail.test_extension_ipam.IpamExtensionTestCase.test_create_ipam
OR
Run the test with "testtools" instead of "testr"
a)
If you are using "run_tests.sh" environment
#source .venv/bin/activate
#.venv/bin/python -m testtools.run neutron.tests.unit.opencontrail.test_extension_ipam.IpamExtensionTestCase.test_create_ipam
b)
If you are using "Tox" environment
#source .tox/py27/bin/activate
#.tox/py27/bin/python -m testtools.run neutron.tests.unit.opencontrail.test_extension_ipam.IpamExtensionTestCase.test_create_ipam
I did some changing in neutron code, How can I re-run devstack so that these changes can be visible in devstack
ReplyDelete"./unstack.sh" then "./clean.sh". After that you can re-run devstack again "./stack.sh".
Delete