blob: 1ca36b7fecb0108236ff1497842667dc37fd6471 [file] [log] [blame]
Michael Johnson34139b02017-03-15 10:31:10 -07001[tox]
2minversion = 2.0
Carlos Goncalves436dd9f2019-02-12 22:08:00 +01003envlist = pep8
Michael Johnson34139b02017-03-15 10:31:10 -07004skipsdist = True
5
6[testenv]
7usedevelop = True
Michael Johnsonf298ed02019-06-28 16:00:38 -07008install_command = pip install {opts} {packages}
Michael Johnson34139b02017-03-15 10:31:10 -07009setenv =
10 VIRTUAL_ENV={envdir}
11 PYTHONWARNINGS=default::DeprecationWarning
Michael Johnsonf298ed02019-06-28 16:00:38 -070012deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
13 -r{toxinidir}/test-requirements.txt
Michael Johnson0f28a482018-05-23 16:22:45 -070014commands =
15 stestr run {posargs}
16 stestr slowest
Michael Johnson34139b02017-03-15 10:31:10 -070017
18[testenv:pep8]
huang.zhipingce50c732018-06-09 18:52:30 +080019basepython = python3
Michael Johnson34139b02017-03-15 10:31:10 -070020commands = flake8 {posargs}
21
22[testenv:venv]
huang.zhipingce50c732018-06-09 18:52:30 +080023basepython = python3
Michael Johnson34139b02017-03-15 10:31:10 -070024commands = {posargs}
25
26[testenv:cover]
huang.zhipingce50c732018-06-09 18:52:30 +080027basepython = python3
Michael Johnson0f28a482018-05-23 16:22:45 -070028setenv =
29 {[testenv]setenv}
30 PYTHON=coverage run --source octavia_tempest_plugin --parallel-mode
31whitelist_externals =
32 find
33commands =
34 find octavia_tempest_plugin -type f -name "*.pyc" -delete
35 coverage erase
36 stestr run {posargs}
37 coverage combine
38 coverage html -d cover
39 coverage xml -o cover/coverage.xml
Michael Johnson34139b02017-03-15 10:31:10 -070040
41[testenv:docs]
huang.zhipingce50c732018-06-09 18:52:30 +080042basepython = python3
Jude Cross986e3f52017-07-24 14:57:20 -070043deps =
Michael Johnsonf298ed02019-06-28 16:00:38 -070044 -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
Jude Cross986e3f52017-07-24 14:57:20 -070045 -r{toxinidir}/requirements.txt
46 -r{toxinidir}/doc/requirements.txt
47whitelist_externals = rm
48commands =
49 rm -rf doc/build
50 sphinx-build -W -b html doc/source doc/build/html
Michael Johnson34139b02017-03-15 10:31:10 -070051
52[testenv:releasenotes]
huang.zhipingce50c732018-06-09 18:52:30 +080053basepython = python3
Jude Cross986e3f52017-07-24 14:57:20 -070054deps =
Michael Johnsonf298ed02019-06-28 16:00:38 -070055 -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
Jude Cross986e3f52017-07-24 14:57:20 -070056 -r{toxinidir}/requirements.txt
57 -r{toxinidir}/doc/requirements.txt
Michael Johnson34139b02017-03-15 10:31:10 -070058commands =
59 sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
60
61[testenv:debug]
huang.zhipingce50c732018-06-09 18:52:30 +080062basepython = python3
Michael Johnson34139b02017-03-15 10:31:10 -070063commands = oslo_debug_helper {posargs}
64
65[flake8]
66# E123, E125 skipped as they are invalid PEP-8.
67
68show-source = True
69ignore = E123,E125
70builtins = _
71exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
Jude Cross986e3f52017-07-24 14:57:20 -070072
73[testenv:genconfig]
huang.zhipingce50c732018-06-09 18:52:30 +080074basepython = python3
Jude Cross986e3f52017-07-24 14:57:20 -070075whitelist_externals = mkdir
76commands =
77 mkdir -p etc
78 oslo-config-generator --output-file etc/octavia.tempest.conf.sample \
79 --namespace tempest.config