Files
nova-specs/tox.ini
Takashi Kajinami 134e8a86b5 tox: Drop envdir
tox now always recreates an env although the env is shared using envdir
options.
~~~
$ tox -e genpolicy
genpolicy: recreate env because env type changed from
{'name': 'genconfig', 'type': 'VirtualEnvRunner'} to
{'name': 'genpolicy', 'type': 'VirtualEnvRunner'}
~~~

According to the maintainer of tox, this functionality is not intended
to be supported.
https://github.com/tox-dev/tox/issues/425#issuecomment-1011944293

Change-Id: I53ae237d0da4195f974ac3fac3ffe0b713d773ce
2025-02-11 13:25:27 +09:00

73 lines
1.8 KiB
INI

[tox]
minversion = 3.18.0
envlist = docs,pep8
skipsdist = True
[testenv]
passenv =
# LOCALE_ARCHIVE is needed when not using python from the system package
# manager (e.g. when installed with nix) to ensure the locale-archive is
# available to the tests. specifically this is needed by sphinx to build
# the docs.
LOCALE_ARCHIVE
OS_DEBUG
basepython = python3
#usedevelop = True
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/doc/requirements.txt
allowlist_externals =
find
bash
[testenv:venv]
commands = {posargs}
[testenv:docs]
commands = sphinx-build -W -b html doc/source doc/build/html
[testenv:fast-specs]
description = Build only specs that have changed since last commit
commands = bash tools/fast-specs.sh
[testenv:pep8]
deps =
{[testenv]deps}
-r{toxinidir}/test-requirements.txt
commands =
find . -type f -name "*.pyc" -delete
stestr run --slowest {posargs}
flake8 {posargs}
[flake8]
ignore = E128,W504
exclude = .venv,.git,.tox,doc,.eggs
[testenv:move-implemented-specs]
# NOTE(mriedem): simplejson is used by launchpadlib but is a lazy import and
# fails if we don't have it.
deps = launchpadlib
simplejson
commands =
python {toxinidir}/tools/move_implemented_specs.py {posargs}
[testenv:count-blueprints]
deps = {[testenv:move-implemented-specs]deps}
commands =
python {toxinidir}/tools/count_blueprints.py {posargs}
[testenv:move-spec]
# Usage:
# tox -e move-spec -- [--dry-run] [--verbose] path/to/spec.rst path/to/destdir
deps=
commands =
python {toxinidir}/tools/move_spec.py {posargs}
[testenv:abandon-spec]
# Usage:
# tox -e abandon-spec -- [--dry-run] [--verbose] path/to/obsolete-spec.rst
deps=
commands =
python {toxinidir}/tools/abandon_spec.py {posargs}