Add a debug env for unit tests

Debugging unit tests locally with pdb ends in failure with tox.
this patch adds debug environment to debug tests with pdb
break points by following below steps.

1. set break point in code by adding import pdb;pdb.set_trace
2. run tox -e debug test_regex

Change-Id: I088a558a1fb68b3bc2a218ccda0911ed1389f91f
This commit is contained in:
Manjeet Singh Bhatia 2018-04-28 00:05:40 +00:00
parent d49a2beeee
commit dd8aea24bd
1 changed files with 3 additions and 0 deletions

View File

@ -20,6 +20,9 @@ commands =
# there is also secret magic in ostestr which lets you run in a fail only # there is also secret magic in ostestr which lets you run in a fail only
# mode. To do this define the TRACE_FAILONLY environmental variable. # mode. To do this define the TRACE_FAILONLY environmental variable.
[testenv:debug]
commands = oslo_debug_helper -t neutron/tests {posargs}
[testenv:common] [testenv:common]
# Fake job to define environment variables shared between dsvm/non-dsvm jobs # Fake job to define environment variables shared between dsvm/non-dsvm jobs
setenv = OS_TEST_TIMEOUT={env:OS_TEST_TIMEOUT:180} setenv = OS_TEST_TIMEOUT={env:OS_TEST_TIMEOUT:180}