From df4cf3e5db2166b67c9e95b381ec19ace10d0279 Mon Sep 17 00:00:00 2001 From: Sivasathurappan Radhakrishnan Date: Tue, 11 Oct 2016 21:55:05 +0000 Subject: [PATCH] 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 --- tox.ini | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tox.ini b/tox.ini index 3fcabbf47e..7cb95b00e7 100644 --- a/tox.ini +++ b/tox.ini @@ -69,6 +69,11 @@ commands = find . -type f -name "*.pyc" -delete python setup.py testr --coverage --testr-args='{posargs}' +[testenv:debug] +commands = + find . -type f -name "*.pyc" -delete + oslo_debug_helper {posargs} + [testenv:venv] commands = {posargs}