Add tox.ini testenv descriptions

Add descriptions for each test that can be run.

TrivialFix

Change-Id: I7314e4c1ee82182cdd6ae12734e8a5f9cadae0e2
This commit is contained in:
Brian Haley 2024-04-29 17:23:56 -04:00
parent 22a3384194
commit a5ee7497b0

45
tox.ini
View File

@ -5,6 +5,8 @@ skipsdist = False
ignore_basepython_conflict = True
[testenv]
description =
Run unit tests.
basepython = {env:TOX_PYTHON:python3}
setenv = VIRTUAL_ENV={envdir}
OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true}
@ -36,6 +38,8 @@ commands =
# mode. To do this define the TRACE_FAILONLY environmental variable.
[testenv:debug]
description =
Run specified tests through oslo_debug_helper, which allows use of pdb.
commands = oslo_debug_helper -t neutron/tests {posargs}
[testenv:common]
@ -53,6 +57,8 @@ setenv = OS_SUDO_TESTING=1
commands = false
[testenv:functional]
description =
Run functional tests.
setenv = {[testenv]setenv}
{[testenv:common]setenv}
OS_TEST_PATH=./neutron/tests/functional
@ -65,6 +71,8 @@ deps =
-r{toxinidir}/neutron/tests/functional/requirements.txt
[testenv:dsvm-functional]
description =
Run functional tests that require sudo privileges.
setenv = {[testenv:functional]setenv}
{[testenv:dsvm]setenv}
deps =
@ -74,6 +82,8 @@ commands =
stestr run {posargs}
[testenv:dsvm-functional-gate]
description =
Run functional gate tests that require sudo privileges.
setenv = {[testenv:dsvm-functional]setenv}
deps = {[testenv:dsvm-functional]deps}
commands =
@ -82,6 +92,8 @@ commands =
stestr run --slowest --combine --concurrency 1 (.*MySQL\.|.*PostgreSQL\.|.*test_get_all_devices|.*TestMetadataAgent\.|.*BaseOVSTestCase\.) {posargs}
[testenv:dsvm-fullstack]
description =
Run fullstack tests.
setenv = {[testenv]setenv}
{[testenv:common]setenv}
{[testenv:dsvm]setenv}
@ -99,6 +111,8 @@ commands =
stestr run --concurrency 2 {posargs}
[testenv:dsvm-fullstack-gate]
description =
Run fullstack gate tests that require sudo privileges.
setenv = {[testenv:dsvm-fullstack]setenv}
deps = {[testenv:dsvm-fullstack]deps}
commands =
@ -108,10 +122,14 @@ commands =
stestr run --slowest --combine --concurrency 1 neutron.tests.fullstack.test_securitygroup.TestSecurityGroupsSameNetwork.test_securitygroup {posargs}
[testenv:releasenotes]
description =
Build release note documentation in HTML format.
deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:pep8]
description =
Run style and lint checks.
deps =
{[testenv]deps}
bashate>=2.1.1 # Apache-2.0
@ -133,6 +151,8 @@ commands=
allowlist_externals = bash
[testenv:cover]
description =
Run unit tests and generate coverage report.
setenv =
{[testenv]setenv}
PYTHON=coverage run --source neutron --parallel-mode
@ -144,9 +164,18 @@ commands =
coverage xml -o cover/coverage.xml
[testenv:venv]
description =
Run specified command in a virtual environment with all dependencies
installed.
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
-r{toxinidir}/requirements.txt
commands = {posargs}
[testenv:docs]
description =
Build documentation in HTML format.
# Do not remove requirements.txt from deps list as without it
# upper constraints will not be used for deps listed in requirements.txt
# and may cause issues
@ -157,6 +186,8 @@ deps =
commands = sphinx-build -W -b html doc/source doc/build/html
[testenv:pdf-docs]
description =
Build documentation in PDF format.
deps = {[testenv:docs]deps}
allowlist_externals =
make
@ -165,6 +196,8 @@ commands =
make -C doc/build/pdf
[testenv:linkcheck]
description =
Build documentation link checks.
deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -W -b linkcheck doc/source doc/build/linkcheck
@ -220,11 +253,15 @@ extension =
import_exceptions = neutron._i18n
[testenv:bandit]
description =
Run bandit security checks.
deps = {[testenv:pep8]deps}
# B104: Possible binding to all interfaces
commands = bandit -r neutron -x tests -n5 -s B104
[testenv:bashate]
description =
Run bashate checks.
deps = {[testenv:pep8]deps}
commands = bash -c "find {toxinidir} \
-not \( -type d -name .tox\* -prune \) \
@ -238,14 +275,20 @@ commands = bash -c "find {toxinidir} \
-print0 | xargs -0 bashate -v -iE006 -eE005,E042,E043"
[testenv:genconfig]
description =
Generate configuration example files.
commands = bash {toxinidir}/tools/generate_config_file_samples.sh
[testenv:genpolicy]
description =
Generate policy example files.
commands = oslopolicy-sample-generator --config-file=etc/oslo-policy-generator/policy.conf
# This environment can be used to quickly validate that all needed system
# packages required to successfully execute test targets are installed
[testenv:bindep]
description =
Run binary dependency checks.
# Do not install any requirements. We want this to be fast and work even if
# system dependencies are missing, since it's used to tell you what system
# dependencies are missing! This also means that bindep must be installed
@ -254,6 +297,8 @@ deps = bindep
commands = bindep test
[testenv:requirements]
description =
Run requirement checks.
deps =
-egit+https://opendev.org/openstack/requirements#egg=openstack-requirements
allowlist_externals = bash