Merge "tox: Reuse envdirs"

This commit is contained in:
Zuul
2018-07-30 15:02:21 +00:00
committed by Gerrit Code Review

15
tox.ini
View File

@@ -56,6 +56,7 @@ commands =
description = description =
Run style checks. Run style checks.
deps = {[testenv]deps} deps = {[testenv]deps}
envdir = {toxworkdir}/venv
commands = commands =
bash tools/flake8wrap.sh {posargs} bash tools/flake8wrap.sh {posargs}
# Check that all JSON files don't have \r\n in line. # Check that all JSON files don't have \r\n in line.
@@ -66,6 +67,7 @@ commands =
[testenv:fast8] [testenv:fast8]
description = description =
Run style checks on the changes made since HEAD~. For a full run including docs, use 'pep8' Run style checks on the changes made since HEAD~. For a full run including docs, use 'pep8'
envdir = {toxworkdir}/venv
commands = commands =
bash tools/flake8wrap.sh -HEAD bash tools/flake8wrap.sh -HEAD
@@ -73,6 +75,7 @@ commands =
# TODO(melwitt): This can be removed when functional tests are gating with # TODO(melwitt): This can be removed when functional tests are gating with
# python 3.x # python 3.x
basepython = python2.7 basepython = python2.7
envdir = {toxworkdir}/py27
setenv = {[testenv]setenv} setenv = {[testenv]setenv}
commands = commands =
{[testenv]commands} {[testenv]commands}
@@ -91,11 +94,13 @@ commands =
# with python 3.5 # with python 3.5
[testenv:functional-py35] [testenv:functional-py35]
basepython = python3.5 basepython = python3.5
envdir = {toxworkdir}/py35
setenv = {[testenv]setenv} setenv = {[testenv]setenv}
commands = commands =
{[testenv:functional]commands} {[testenv:functional]commands}
[testenv:api-samples] [testenv:api-samples]
envdir = {toxworkdir}/venv
setenv = setenv =
{[testenv]setenv} {[testenv]setenv}
GENERATE_SAMPLES=True GENERATE_SAMPLES=True
@@ -106,14 +111,17 @@ commands =
stestr slowest stestr slowest
[testenv:genconfig] [testenv:genconfig]
envdir = {toxworkdir}/venv
commands = commands =
oslo-config-generator --config-file=etc/nova/nova-config-generator.conf oslo-config-generator --config-file=etc/nova/nova-config-generator.conf
[testenv:genpolicy] [testenv:genpolicy]
envdir = {toxworkdir}/venv
commands = commands =
oslopolicy-sample-generator --config-file=etc/nova/nova-policy-generator.conf oslopolicy-sample-generator --config-file=etc/nova/nova-policy-generator.conf
[testenv:genplacementpolicy] [testenv:genplacementpolicy]
envdir = {toxworkdir}/venv
commands = commands =
oslopolicy-sample-generator --config-file=etc/nova/placement-policy-generator.conf oslopolicy-sample-generator --config-file=etc/nova/placement-policy-generator.conf
@@ -122,6 +130,7 @@ commands =
# section once we rely on coverage 4.3+ # section once we rely on coverage 4.3+
# #
# https://bitbucket.org/ned/coveragepy/issues/519/ # https://bitbucket.org/ned/coveragepy/issues/519/
envdir = {toxworkdir}/venv
setenv = setenv =
{[testenv]setenv} {[testenv]setenv}
PYTHON=coverage run --source nova --parallel-mode PYTHON=coverage run --source nova --parallel-mode
@@ -135,6 +144,7 @@ commands =
coverage report coverage report
[testenv:debug] [testenv:debug]
envdir = {toxworkdir}/venv
commands = commands =
{[testenv]commands} {[testenv]commands}
oslo_debug_helper {posargs} oslo_debug_helper {posargs}
@@ -167,6 +177,7 @@ commands =
[testenv:api-guide] [testenv:api-guide]
description = description =
Generate the API guide. Called from CI scripts to test and publish to developer.openstack.org. Generate the API guide. Called from CI scripts to test and publish to developer.openstack.org.
envdir = {toxworkdir}/docs
deps = {[testenv:docs]deps} deps = {[testenv:docs]deps}
commands = commands =
rm -rf api-guide/build rm -rf api-guide/build
@@ -175,6 +186,7 @@ commands =
[testenv:api-ref] [testenv:api-ref]
description = description =
Generate the API ref. Called from CI scripts to test and publish to developer.openstack.org. Generate the API ref. Called from CI scripts to test and publish to developer.openstack.org.
envdir = {toxworkdir}/docs
deps = {[testenv:docs]deps} deps = {[testenv:docs]deps}
commands = commands =
rm -rf api-ref/build rm -rf api-ref/build
@@ -183,6 +195,7 @@ commands =
[testenv:placement-api-ref] [testenv:placement-api-ref]
description = description =
Generate the Placement API ref. Called from CI scripts to test and publish to developer.openstack.org. Generate the Placement API ref. Called from CI scripts to test and publish to developer.openstack.org.
envdir = {toxworkdir}/docs
deps = {[testenv:docs]deps} deps = {[testenv:docs]deps}
commands = commands =
# Check that all placement api routes are in the documentation # Check that all placement api routes are in the documentation
@@ -193,6 +206,7 @@ commands =
[testenv:releasenotes] [testenv:releasenotes]
description = description =
Generate release notes. Generate release notes.
envdir = {toxworkdir}/docs
deps = {[testenv:docs]deps} deps = {[testenv:docs]deps}
commands = commands =
rm -rf releasenotes/build rm -rf releasenotes/build
@@ -201,6 +215,7 @@ commands =
[testenv:bandit] [testenv:bandit]
# NOTE(browne): This is required for the integration test job of the bandit # NOTE(browne): This is required for the integration test job of the bandit
# project. Please do not remove. # project. Please do not remove.
envdir = {toxworkdir}/venv
commands = bandit -r nova -x tests -n 5 -ll commands = bandit -r nova -x tests -n 5 -ll
[flake8] [flake8]