aodh/tox.ini
Andreas Jaeger 5bd747b888 Fix releasenotes builds
The updated releasenote and requirements jobs expect requirements for
docs in one of the requirements files. Move requirements from setup.cfg
to doc/requirements.txt file.

Update also releasenotes build to use same command as in jobs - build
with warnings as errors.

See also
https://governance.openstack.org/tc/reference/project-testing-interface.html#documentation

Fix failure of building with warnings as errors:
Replace the instructions for querying for release notes for newton
with the results of a reno report because some of the broken release notes
are on branches that have been closed and we have no way to edit them.

Depends-On: I994aa3cf173ec8a9412239544e3269aca17adc25
Change-Id: If8df8a6e8cad2d9247f07c9ed7a71f29b19f7d51
2017-11-22 20:35:32 +01:00

75 lines
2.2 KiB
INI

[tox]
minversion = 1.6
skipsdist = True
envlist = py{27,35}{,-mysql,-postgresql},functional,pep8
[testenv]
# NOTE(tonyb): This project has chosen to *NOT* consume upper-constraints.txt
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 = .[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>=0.12,<0.13
commands =
flake8
# Check that .po and .pot files are valid:
bash -c "find aodh -type f -regex '.*\.pot?' -print0|xargs -0 -n 1 msgfmt --check-format -o /dev/null"
[testenv:releasenotes]
deps = -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:docs]
deps = -r{toxinidir}/doc/requirements.txt
commands = python setup.py build_sphinx
setenv = PYTHONHASHSEED=0
[testenv:venv]
deps = -r{toxinidir}/doc/requirements.txt
commands = {posargs}
setenv = PYTHONHASHSEED=0
[testenv:debug]
commands = bash -x oslo_debug_helper {posargs}
[testenv:debug-mysql]
deps = .[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 = .[postgresql,test]
setenv = OS_TEST_PATH=aodh/tests/functional/
commands = pifpaf -g AODH_TEST_STORAGE_URL run postgresql -- oslo_debug_helper {posargs}
[flake8]
ignore =
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
# [H106] Don't put vim configuration in source files.
# [H203] Use assertIs(Not)None to check for None.
enable-extensions=H106,H203
show-source = True
[hacking]
import_exceptions =
aodh.i18n