From 405bb93030c781ea49ad7b1e5fb719a8986e2ec5 Mon Sep 17 00:00:00 2001 From: Sean Mooney Date: Thu, 7 Nov 2024 17:06:51 +0000 Subject: [PATCH] [tox] update tox.ini to enable debugging This change adds supprot for OS_DEBUG and also configures default testing timeouts and log capture. Change-Id: I685fee4081cdee82c508b6d25c534483f2caf09b --- tox.ini | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 47b8eadc5..eef2eb1d2 100644 --- a/tox.ini +++ b/tox.ini @@ -10,7 +10,11 @@ allowlist_externals = find rm install_command = pip install -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} {opts} {packages} setenv = - VIRTUAL_ENV={envdir} + VIRTUAL_ENV={envdir} + OS_STDOUT_CAPTURE=1 + OS_STDERR_CAPTURE=1 + OS_TEST_TIMEOUT=30 + PYTHONDONTWRITEBYTECODE=1 deps = -r{toxinidir}/test-requirements.txt -r{toxinidir}/requirements.txt @@ -26,6 +30,12 @@ passenv = HTTPS_PROXY no_proxy NO_PROXY + OS_DEBUG + # NOTE(sean-k-mooney) optimization is enabled by default and when enabled + # asserts are complied out. Disable optimization to allow asserts in + # nova to fire in unit and functional tests. This can be useful for + # debugging issue with fixtures and mocks. + PYTHONOPTIMIZE [testenv:pep8] commands =