ce0954c8e7
Moving on py3 as the default runtime for tox to avoid to update this at each new cycle. Wallaby support officially the following runtimes [1]: - Python 3.6 - Python 3.8 During Victoria Python 3.7 was used as the default runtime [2] however this version isn't longer officially supported. [1] https://governance.openstack.org/tc/reference/runtimes/wallaby.html#python-runtimes-for-wallaby [2] https://governance.openstack.org/tc/reference/runtimes/victoria.html#python-runtimes-for-victoria Change-Id: Id4acb623ef216249385e8020ca9ca1ec68e987a8
94 lines
2.7 KiB
INI
94 lines
2.7 KiB
INI
[tox]
|
|
minversion = 3.1.1
|
|
skipsdist = True
|
|
envlist = py{3}{,-mysql,-postgresql},functional,pep8
|
|
ignore_basepython_conflict = True
|
|
|
|
[testenv]
|
|
basepython = python3
|
|
usedevelop = True
|
|
setenv =
|
|
AODH_TEST_DRIVERS=postgresql mysql
|
|
mysql: AODH_TEST_DRIVERS=mysql
|
|
postgresql: AODH_TEST_DRIVERS=postgresql
|
|
|
|
AODH_TEST_DEPS=postgresql,mysql
|
|
mysql: AODH_TEST_DEPS=mysql
|
|
postgresql: AODH_TEST_DEPS=postgresql
|
|
deps =
|
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
.[test,{env:AODH_TEST_DEPS}]
|
|
passenv = OS_TEST_TIMEOUT OS_STDOUT_CAPTURE OS_STDERR_CAPTURE OS_LOG_CAPTURE AODH_TEST_DRIVERS
|
|
commands =
|
|
{toxinidir}/run-tests.sh {posargs}
|
|
{toxinidir}/run-functional-tests.sh "{posargs}"
|
|
aodh-config-generator
|
|
whitelist_externals = bash
|
|
|
|
[testenv:cover]
|
|
commands =
|
|
pifpaf -g AODH_TEST_STORAGE_URL run mysql -- python setup.py testr --slowest --coverage --testr-args="{posargs}"
|
|
coverage report
|
|
|
|
[testenv:pep8]
|
|
deps = hacking>=3.0,<3.1.0
|
|
commands =
|
|
flake8
|
|
|
|
[testenv:releasenotes]
|
|
deps = {[testenv:docs]deps}
|
|
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
|
|
[testenv:docs]
|
|
deps =
|
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
-r{toxinidir}/doc/requirements.txt
|
|
commands = sphinx-build -W -b html doc/source doc/build/html
|
|
setenv = PYTHONHASHSEED=0
|
|
|
|
[testenv:pdf-docs]
|
|
deps = {[testenv:docs]deps}
|
|
whitelist_externals =
|
|
make
|
|
commands =
|
|
sphinx-build -W -b latex doc/source doc/build/pdf
|
|
make -C doc/build/pdf
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
setenv = PYTHONHASHSEED=0
|
|
|
|
[testenv:debug]
|
|
commands = bash -x oslo_debug_helper {posargs}
|
|
|
|
[testenv:debug-mysql]
|
|
deps =
|
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
.[mysql,test]
|
|
setenv = OS_TEST_PATH=aodh/tests/functional/
|
|
commands = pifpaf -g AODH_TEST_STORAGE_URL run mysql -- oslo_debug_helper {posargs}
|
|
|
|
[testenv:debug-pgsql]
|
|
deps =
|
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
|
.[postgresql,test]
|
|
setenv = OS_TEST_PATH=aodh/tests/functional/
|
|
commands = pifpaf -g AODH_TEST_STORAGE_URL run postgresql -- oslo_debug_helper {posargs}
|
|
|
|
[flake8]
|
|
# W503 line break before binary operator
|
|
# W504 line break after binary operator
|
|
# E402 module level import not at top of file
|
|
ignore = W503,W504,E402
|
|
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
|
|
# [H106] Do not put vim configuration in source files.
|
|
# [H203] Use assertIs(Not)None to check for None.
|
|
# [H204] Use assert(Not)Equal to check for equality.
|
|
# [H205] Use assert(Greater|Less)(Equal) for comparison.
|
|
enable-extensions=H106,H203,H204,H205
|
|
show-source = True
|
|
|
|
[hacking]
|
|
import_exceptions =
|
|
aodh.i18n
|