Files
b9bf00ee0dee4095e18061b98e5b36434cf01d13
nova /tox.ini

272 lines
8.8 KiB
INI
Raw Normal View History

[testenv]
bash
find
rm
env
VIRTUAL_ENV={envdir}
LANGUAGE=en_US
LC_ALL=en_US.utf-8
OS_STDOUT_CAPTURE=1
OS_STDERR_CAPTURE=1
OS_TEST_TIMEOUT=160
PYTHONWARNINGS = ignore::UserWarning:psycopg2
OS_DEBUG GENERATE_HASHES
basepython = python2.7
stestr run {posargs}
env TEST_OSPROFILER=1 stestr run --combine --no-discover 'nova.tests.unit.test_profiler'
stestr slowest
[testenv:py35]
basepython = python3.5
env TEST_OSPROFILER=1 stestr run --combine --no-discover 'nova.tests.unit.test_profiler'
basepython = python3.6
Run style checks.
bash -c "! find doc/ -type f -name *.json | xargs grep -U -n $'\r'"
bash -c '! find doc/ -type f -name *.json | xargs -t -n1 python -m json.tool 2>&1 > /dev/null | grep -B1 -v ^python'
Run style checks on the changes made since HEAD~. For a full run including docs, use 'pep8'
bash tools/flake8wrap.sh -HEAD
# python 3.x
# same process when running concurently. The following ensures that gabbi tests
# coming from the same YAML file are all in the same process. This is important
# because each YAML file represents an ordered sequence of HTTP requests. Note
# that tests which do not match this regex will not be grouped in any
# special way. See the following for more details.
# http://stestr.readthedocs.io/en/latest/MANUAL.html#grouping-tests
# https://gabbi.readthedocs.io/en/latest/#purpose
# with python 3.5
[testenv:functional-py35]
basepython = python3.5
basepython = python3.6
envdir = {toxworkdir}/py36
setenv = {[testenv]setenv}
commands =
{[testenv:functional]commands}
{[testenv]setenv}
GENERATE_SAMPLES=True
PYTHONHASHSEED=0
oslo-config-generator --config-file=etc/nova/nova-config-generator.conf
oslopolicy-sample-generator --config-file=etc/nova/nova-policy-generator.conf
oslopolicy-sample-generator --config-file=etc/nova/placement-policy-generator.conf
# section once we rely on coverage 4.3+
#
# https://bitbucket.org/ned/coveragepy/issues/519/
{[testenv]setenv}
PYTHON=coverage run --source nova --parallel-mode
coverage html -d cover
coverage xml -o cover/coverage.xml
-r{toxinidir}/doc/requirements.txt
{posargs}
Build all documentation including API guides and refs.
bash -c "! find doc/ -type f -name *.json | xargs grep -U -n $'\r'"
# Test the redirects. This must run after the main docs build
whereto doc/build/html/.htaccess doc/test/redirect-tests.txt
{[testenv:api-ref]commands}
{[testenv:placement-api-ref]commands}
[testenv:api-guide]
Generate the API guide. 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.
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
Generate the Placement API ref. Called from CI scripts to test and publish to developer.openstack.org.
rm -rf placement-api-ref/build
sphinx-build -W -b html -d placement-api-ref/build/doctrees placement-api-ref/source placement-api-ref/build/html
Generate release notes.
rm -rf releasenotes/build
sphinx-build -W -b html -d releasenotes/build/doctrees releasenotes/source releasenotes/build/html
# NOTE(browne): This is required for the integration test job of the bandit
# project. Please do not remove.
# https://github.com/jcrocholl/pep8/issues/126. It's just wrong.
#
# Most of the whitespace related rules (E12* and E131) are excluded
# because while they are often useful guidelines, strict adherence to
# them ends up causing some really odd code formatting and forced
# extra line breaks. Updating code to enforce these will be a hard sell.
#
# H405 is another one that is good as a guideline, but sometimes
# multiline doc strings just don't have a natural summary
# line. Rejecting code for this reason is wrong.
#
# to 25 and run 'tox -epep8'.
[hacking]
local-check-factory = nova.hacking.checks.factory
# 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
# separately, outside of the requirements files, and develop mode disabled
# explicitly to avoid unnecessarily installing the checked-out repo too (this
# further relies on "tox.skipsdist = True" above).
usedevelop = False
commands =
bindep test
[testenv:lower-constraints]
deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
commands =