Add debug to tox environment

The oslotest package distributes a shell file that may be used to assist
in debugging python code. The shell file uses testtools, and supports
debugging with pdb. Debug tox environment implements following test
instructions.
https://wiki.openstack.org/wiki/Testr#Debugging_.28pdb.29_Tests

To enable debugging, run tox with the debug environment. Below are the
following ways to run it.

 * tox -e debug module
 * tox -e debug module.test_class
 * tox -e debug module.test_class.test_method

Change-Id: I08937845803be7bd125b838ab07bda56f202e88d
Closes-Bug: 1632486
This commit is contained in:
Sivasathurappan Radhakrishnan
2016-10-11 21:55:05 +00:00
parent 035c1177de
commit df4cf3e5db
+5
View File
@@ -69,6 +69,11 @@ commands =
find . -type f -name "*.pyc" -delete find . -type f -name "*.pyc" -delete
python setup.py testr --coverage --testr-args='{posargs}' python setup.py testr --coverage --testr-args='{posargs}'
[testenv:debug]
commands =
find . -type f -name "*.pyc" -delete
oslo_debug_helper {posargs}
[testenv:venv] [testenv:venv]
commands = {posargs} commands = {posargs}