summaryrefslogtreecommitdiff
path: root/tox.ini
blob: 74191c978afabbc5d7ec807ae368ff16f4fd5353 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
[tox]
minversion = 1.6
envlist = py26,py27,py33,py34,pep8,pylint
skipsdist = True

[testenv]
sitepackages = False
usedevelop = True
install_command = pip install -U {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
         PYTHONHASHSEED=0
deps = -r{toxinidir}/requirements.txt
       -r{toxinidir}/test-requirements.txt
commands =
  # Use the lockutils wrapper to ensure that external locking works correctly
  lockutils-wrapper python setup.py test --slowest --testr-args='{posargs}'

[flake8]
show-source = True
ignore = E123,H405,H904
exclude = .venv,.tox,dist,doc,*.egg,.update-venv

[testenv:pep8]
commands = flake8 {posargs}
           python ./tools/check_maintainers.py

[testenv:pylint]
deps = pylint>=0.26.0
commands = python ./tools/lint.py ./openstack
           python ./tools/lint.py ./tests

[testenv:cover]
commands =
  # due to dependencies between tests (bug 1192207) we use `--concurrency=1` option
  # Use the lockutils wrapper to ensure that external locking works correctly
  lockutils-wrapper python setup.py test --coverage --testr-args='--concurrency=1 {posargs}'

[testenv:docs]
commands = python setup.py build_sphinx

[testenv:venv]
commands = {posargs}

[testenv:relnotes]
deps = -r{toxinidir}/tools/requirements.txt
commands = python ./tools/release_notes.py {posargs}

[testenv:unreleased]
deps = -r{toxinidir}/tools/requirements.txt
commands = {toxinidir}/tools/list_unreleased_changes.sh {posargs}

[testenv:pyflakes]
commands = flake8

[testenv:dashboards]
skipdist = True
usedevelop = True
deps =
commands =
   git clone https://git.openstack.org/stackforge/gerrit-dash-creator {envdir}/gerrit-dash-creator
   pip install -r {envdir}/gerrit-dash-creator/requirements.txt
   {toxinidir}/tools/build_dashboards.sh {envdir}/gerrit-dash-creator {toxinidir}/dashboards

[hacking]
import_exceptions =
  openstack.common._i18n
  oslo.i18n