blob: 70b834d0c67969c16b820d9f2c4d278dec20615f [file] [log] [blame]
Michael Johnson34139b02017-03-15 10:31:10 -07001[tox]
2minversion = 2.0
3envlist = py35,py27,pep8
4skipsdist = True
5
6[testenv]
7usedevelop = True
8install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
9setenv =
10 VIRTUAL_ENV={envdir}
11 PYTHONWARNINGS=default::DeprecationWarning
12deps = -r{toxinidir}/test-requirements.txt
Michael Johnson0f28a482018-05-23 16:22:45 -070013commands =
14 stestr run {posargs}
15 stestr slowest
Michael Johnson34139b02017-03-15 10:31:10 -070016
17[testenv:pep8]
18commands = flake8 {posargs}
19
20[testenv:venv]
21commands = {posargs}
22
23[testenv:cover]
Michael Johnson0f28a482018-05-23 16:22:45 -070024setenv =
25 {[testenv]setenv}
26 PYTHON=coverage run --source octavia_tempest_plugin --parallel-mode
27whitelist_externals =
28 find
29commands =
30 find octavia_tempest_plugin -type f -name "*.pyc" -delete
31 coverage erase
32 stestr run {posargs}
33 coverage combine
34 coverage html -d cover
35 coverage xml -o cover/coverage.xml
Michael Johnson34139b02017-03-15 10:31:10 -070036
37[testenv:docs]
Jude Cross986e3f52017-07-24 14:57:20 -070038deps =
39 -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
40 -r{toxinidir}/requirements.txt
41 -r{toxinidir}/doc/requirements.txt
42whitelist_externals = rm
43commands =
44 rm -rf doc/build
45 sphinx-build -W -b html doc/source doc/build/html
Michael Johnson34139b02017-03-15 10:31:10 -070046
47[testenv:releasenotes]
Jude Cross986e3f52017-07-24 14:57:20 -070048deps =
49 -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
50 -r{toxinidir}/requirements.txt
51 -r{toxinidir}/doc/requirements.txt
Michael Johnson34139b02017-03-15 10:31:10 -070052commands =
53 sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
54
55[testenv:debug]
56commands = oslo_debug_helper {posargs}
57
58[flake8]
59# E123, E125 skipped as they are invalid PEP-8.
60
61show-source = True
62ignore = E123,E125
63builtins = _
64exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
Jude Cross986e3f52017-07-24 14:57:20 -070065
66[testenv:genconfig]
67whitelist_externals = mkdir
68commands =
69 mkdir -p etc
70 oslo-config-generator --output-file etc/octavia.tempest.conf.sample \
71 --namespace tempest.config