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.

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

Signed-off-by: Yadnesh Kulkarni <ykulkarn@redhat.com>
Change-Id: I7015ab52ba3f5075b5e06992bb8d72f52104a24e
This commit is contained in:
Yadnesh Kulkarni 2022-07-04 10:12:49 +00:00
parent 41ac16b5ed
commit 0b6abba5d3

View File

@ -60,6 +60,11 @@ commands =
sphinx-build -W -b latex doc/source doc/build/pdf
make -C doc/build/pdf
[testenv:debug]
commands=
find . -type f -name "*.pyc" -delete
oslo_debug_helper {posargs}
[testenv:venv]
commands = {posargs}
setenv = PYTHONHASHSEED=0