blob: d7d9ddde3bf8b931915ea7e99421d672dc3e2e8b [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]
huang.zhipingce50c732018-06-09 18:52:30 +080018basepython = python3
Michael Johnson34139b02017-03-15 10:31:10 -070019commands = flake8 {posargs}
20
21[testenv:venv]
huang.zhipingce50c732018-06-09 18:52:30 +080022basepython = python3
Michael Johnson34139b02017-03-15 10:31:10 -070023commands = {posargs}
24
25[testenv:cover]
huang.zhipingce50c732018-06-09 18:52:30 +080026basepython = python3
Michael Johnson0f28a482018-05-23 16:22:45 -070027setenv =
28 {[testenv]setenv}
29 PYTHON=coverage run --source octavia_tempest_plugin --parallel-mode
30whitelist_externals =
31 find
32commands =
33 find octavia_tempest_plugin -type f -name "*.pyc" -delete
34 coverage erase
35 stestr run {posargs}
36 coverage combine
37 coverage html -d cover
38 coverage xml -o cover/coverage.xml
Michael Johnson34139b02017-03-15 10:31:10 -070039
40[testenv:docs]
huang.zhipingce50c732018-06-09 18:52:30 +080041basepython = python3
Jude Cross986e3f52017-07-24 14:57:20 -070042deps =
43 -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
44 -r{toxinidir}/requirements.txt
45 -r{toxinidir}/doc/requirements.txt
46whitelist_externals = rm
47commands =
48 rm -rf doc/build
49 sphinx-build -W -b html doc/source doc/build/html
Michael Johnson34139b02017-03-15 10:31:10 -070050
51[testenv:releasenotes]
huang.zhipingce50c732018-06-09 18:52:30 +080052basepython = python3
Jude Cross986e3f52017-07-24 14:57:20 -070053deps =
54 -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
55 -r{toxinidir}/requirements.txt
56 -r{toxinidir}/doc/requirements.txt
Michael Johnson34139b02017-03-15 10:31:10 -070057commands =
58 sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
59
60[testenv:debug]
huang.zhipingce50c732018-06-09 18:52:30 +080061basepython = python3
Michael Johnson34139b02017-03-15 10:31:10 -070062commands = oslo_debug_helper {posargs}
63
64[flake8]
65# E123, E125 skipped as they are invalid PEP-8.
66
67show-source = True
68ignore = E123,E125
69builtins = _
70exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
Jude Cross986e3f52017-07-24 14:57:20 -070071
72[testenv:genconfig]
huang.zhipingce50c732018-06-09 18:52:30 +080073basepython = python3
Jude Cross986e3f52017-07-24 14:57:20 -070074whitelist_externals = mkdir
75commands =
76 mkdir -p etc
77 oslo-config-generator --output-file etc/octavia.tempest.conf.sample \
78 --namespace tempest.config