|
|
|
@ -1,46 +1,64 @@
|
|
|
|
|
[tox]
|
|
|
|
|
envlist = py27,py35, pep8
|
|
|
|
|
minversion = 2.3.2
|
|
|
|
|
envlist = py27,py35,py36,pep8
|
|
|
|
|
minversion = 1.6
|
|
|
|
|
skipsdist = True
|
|
|
|
|
|
|
|
|
|
[testenv]
|
|
|
|
|
# Note the hash seed is set to 0 until heat can be tested with a
|
|
|
|
|
# random hash seed successfully.
|
|
|
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
|
|
|
PYTHONWARNINGS=default::DeprecationWarning
|
|
|
|
|
OS_TEST_PATH=gbpautomation/heat/tests
|
|
|
|
|
PYTHONHASHSEED=0
|
|
|
|
|
usedevelop = True
|
|
|
|
|
install_command = pip install {opts} {packages}
|
|
|
|
|
deps =
|
|
|
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/rocky}
|
|
|
|
|
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/stein}
|
|
|
|
|
-r{toxinidir}/requirements.txt
|
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
|
commands =
|
|
|
|
|
python setup.py testr --slowest --testr-args='^(?!functionaltests) {posargs}'
|
|
|
|
|
stestr run '^(?!functionaltests){posargs}'
|
|
|
|
|
stestr slowest
|
|
|
|
|
|
|
|
|
|
whitelist_externals = bash
|
|
|
|
|
whitelist_externals =
|
|
|
|
|
bash
|
|
|
|
|
# to avoid deprecation warning due to 'find' in cover env.
|
|
|
|
|
find
|
|
|
|
|
|
|
|
|
|
[testenv:functional]
|
|
|
|
|
commands =
|
|
|
|
|
python -c "print('TODO: functional tests')"
|
|
|
|
|
|
|
|
|
|
[testenv:pep8]
|
|
|
|
|
basepython = python3
|
|
|
|
|
commands =
|
|
|
|
|
flake8
|
|
|
|
|
# Check that .po and .pot files are valid:
|
|
|
|
|
# bash -c "find gbpautomation -type f -regex '.*\.pot?' -print0|xargs -0 -n 1 msgfmt --check-format -o /dev/null"
|
|
|
|
|
|
|
|
|
|
[testenv:venv]
|
|
|
|
|
basepython = python3
|
|
|
|
|
commands = {posargs}
|
|
|
|
|
|
|
|
|
|
[testenv:cover]
|
|
|
|
|
basepython = python3
|
|
|
|
|
setenv =
|
|
|
|
|
PYTHON=coverage run --source gbpautomation --parallel-mode
|
|
|
|
|
commands =
|
|
|
|
|
python setup.py testr --coverage --testr-args='{posargs}'
|
|
|
|
|
coverage erase
|
|
|
|
|
find {toxinidir} -not -path '{toxinidir}/.tox/*' -not -path '*/__pycache__/*' -name '*.py[c|o]' -delete
|
|
|
|
|
stestr run {posargs}
|
|
|
|
|
coverage combine
|
|
|
|
|
coverage html -d cover
|
|
|
|
|
coverage xml -o cover/coverage.xml
|
|
|
|
|
coverage report
|
|
|
|
|
|
|
|
|
|
[testenv:docs]
|
|
|
|
|
deps = -r{toxinidir}/requirements.txt
|
|
|
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
|
sphinxcontrib-httpdomain
|
|
|
|
|
commands = python setup.py build_sphinx
|
|
|
|
|
basepython = python3
|
|
|
|
|
deps = -r{toxinidir}/doc/requirements.txt
|
|
|
|
|
commands =
|
|
|
|
|
rm -rf doc/build
|
|
|
|
|
sphinx-build -W -b html doc/source doc/build/html
|
|
|
|
|
|
|
|
|
|
[flake8]
|
|
|
|
|
# H302 import only modules.'bla..' does not import a module
|
|
|
|
@ -50,3 +68,15 @@ ignore = H302,H404,H803
|
|
|
|
|
show-source = true
|
|
|
|
|
builtins = _
|
|
|
|
|
exclude=.venv,.git,.tox,dist,*openstack/common*,*lib/python*,*egg,tools,build
|
|
|
|
|
|
|
|
|
|
[testenv:bindep]
|
|
|
|
|
basepython = python3
|
|
|
|
|
# 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
|
|
|
|
|