Add debug testenv in tox

Once we add debug testenv, we can use "tox -e debug" to debug test cases
when tox is running. Then tox will use oslotest which really debug our
test cases. Only we should do is insert pdb into code.
It's easy to use.

the same in magnum:
https://review.openstack.org/#/c/266020/

Closes-Bug: #1534030
Change-Id: I63ea8086e269b4ecacb7f7e337f1adf2a869db94
This commit is contained in:
ting.wang 2016-01-12 11:18:22 +08:00 committed by ting wang
parent e9452a6e7c
commit dfb7d1faf4
1 changed files with 11 additions and 0 deletions

11
tox.ini
View File

@ -25,6 +25,17 @@ deps = setuptools<3.2
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
[testenv:debug]
commands = oslo_debug_helper -t magnumclient/tests {posargs}
[testenv:debug-py27]
basepython = python2.7
commands = oslo_debug_helper -t magnumclient/tests {posargs}
[testenv:debug-py34]
basepython = python3.4
commands = oslo_debug_helper -t magnumclient/tests {posargs}
[testenv:pep8]
commands = flake8