Files
49c05a243018b64e3ba0c30e39515e541b610669
nova /tox.ini

168 lines
5.9 KiB
INI
Raw Normal View History

[testenv]
whitelist_externals = bash
find
setenv = VIRTUAL_ENV={envdir}
# after I937823ffeb95725f0b55e298ebee1857d6482883 lands.
# mode. To do this define the TRACE_FAILONLY environmental variable.
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
install_command = {[testenv:common-constraints]install_command}
commands =
bash tools/flake8wrap.sh {posargs}
# .testrepository and try again. Running py34 before py27 is OK, but not the
# other way around. See: https://bugs.launchpad.net/testrepository/+bug/1212909
find . -type f -name "*.pyc" -delete
install_command = {[testenv:common-constraints]install_command}
setenv = {[testenv]setenv}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = {[testenv:py34]commands}
usedevelop = True
install_command = pip install -U --force-reinstall {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
OS_TEST_PATH=./nova/tests/functional
find . -type f -name "*.pyc" -delete
usedevelop = True
install_command = pip install -U --force-reinstall {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
GENERATE_SAMPLES=True
PYTHONHASHSEED=0
OS_TEST_PATH=./nova/tests/functional/api_sample_tests
LANGUAGE=en_US
commands =
find . -type f -name "*.pyc" -delete
bash tools/pretty_tox.sh '{posargs}'
usedevelop = {[testenv:functional]usedevelop}
install_command = {[testenv:common-constraints]install_command}
setenv = {[testenv:functional]setenv}
commands =
find . -type f -name "*.pyc" -delete
bash tools/pretty_tox.sh '{posargs}'
# Also do not run test_coverage_ext tests while gathering coverage as those
# tests conflict with coverage.
commands =
coverage html --include='nova/*' --omit='nova/openstack/common/*' -d covhtml -i
install_command = {[testenv:common-constraints]install_command}
# Also do not run test_coverage_ext tests while gathering coverage as those
# tests conflict with coverage.
commands =
coverage erase
python setup.py testr --coverage \
--testr-args='{posargs}'
coverage combine
coverage html --include='nova/*' --omit='nova/openstack/common/*' -d covhtml -i
install_command = {[testenv:common-constraints]install_command}
commands = {posargs}
bash -c '! find doc/ -type f -name *.json | xargs -t -n1 python -m json.tool 2>&1 > /dev/null | grep -B1 -v ^python'
[testenv:api-guide]
# This environment is called from CI scripts to test and publish
# the API Guide to developer.openstack.org.
commands =
install_command = {[testenv:common-constraints]install_command}
commands = {[testenv:docs]commands}
commands = bandit -c bandit.yaml -r nova -n 5 -ll
# 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