Files
5ae26f3c7e7261ff26c2415e5482da8f4d06aab0
nova /tox.ini

169 lines
6.1 KiB
INI
Raw Normal View History

[testenv]
whitelist_externals = bash
setenv = VIRTUAL_ENV={envdir}
# NOTE(mriedem): If py34 fails with "db type could not be determined", delete
# .testrepository and try again. Running py34 before py27 is OK, but not the
# other way around. See: https://bugs.launchpad.net/testrepository/+bug/1212909
# mode. To do this define the TRACE_FAILONLY environmental variable.
commands =
{[testenv]commands}
bash tools/pretty_tox.sh '{posargs}'
[testenv:py34]
commands =
{[testenv]commands}
bash tools/pretty_tox3.sh '{posargs}'
[testenv:py35]
commands =
{[testenv]commands}
bash tools/pretty_tox3.sh '{posargs}'
bash -c '! find doc/ -type f -name *.json | xargs -t -n1 python -m json.tool 2>&1 > /dev/null | grep -B1 -v ^python'
# with python 3.x
basepython = python2.7
setenv = VIRTUAL_ENV={envdir}
OS_TEST_PATH=./nova/tests/functional
usedevelop = True
setenv = VIRTUAL_ENV={envdir}
GENERATE_SAMPLES=True
PYTHONHASHSEED=0
OS_TEST_PATH=./nova/tests/functional/api_sample_tests
LANGUAGE=en_US
commands =
commands = oslopolicy-sample-generator --config-file=etc/nova/nova-policy-generator.conf
# Also do not run test_coverage_ext tests while gathering coverage as those
# tests conflict with coverage.
coverage erase
oslopolicy-policy-generator --namespace nova --output-file etc/nova/policy.yaml.merged
[testenv:api-guide]
# This environment is called from CI scripts to test and publish
# the API Guide to developer.openstack.org.
commands =
# This environment is called from CI scripts to test and publish
# the API Ref to developer.openstack.org.
commands =
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
# project. Please do not remove.
commands = bandit -r nova -x tests -n 5 -ll
# 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
[testenv:pip-missing-reqs]
# do not install test-requirements as that will pollute the virtualenv for
# determining missing packages
# this also means that pip-missing-reqs must be installed separately, outside
# of the requirements.txt files
deps = pip_missing_reqs
[testenv:bindep]
# 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).
deps = bindep
commands = bindep test
usedevelop = False