Enable usage of oslo_debug_helper from tox

The script oslo_debug_helper enables the usage of Python's pdb without
having to do the tedious listing of test cases from testr and then
running it. Only thing that needs to be done now is the adding of
"import pdb; pdb.set_trace()" as usual and then one can just call:

    $ tox -e debug

And we will end up in the debugger when that test is hit.

Note that you can also give a test_regex such as:

    $ tox -e debug -- some_test_regex

To run only tests that match that regex.

Change-Id: I63386e68ac3ef5c05bc8290d889efa7f71b33cf1
This commit is contained in:
Juan Antonio Osorio Robles
2015-01-17 17:47:49 +02:00
parent 0d2200f477
commit 9508151e6c
2 changed files with 4 additions and 0 deletions

View File

@@ -8,6 +8,7 @@ httpretty>=0.8.0,!=0.8.1,!=0.8.2,!=0.8.3
mock>=1.0
testrepository>=0.0.18
testtools>=0.9.36,!=1.2.0
oslotest>=1.2.0
# Documentation build requirements
sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3

View File

@@ -15,6 +15,9 @@ commands =
coverage combine
coverage report -m
[testenv:debug]
commands = oslo_debug_helper -t barbicanclient {posargs}
[testenv:pep8]
commands = {toxinidir}/tools/hacking.sh {posargs}