summaryrefslogtreecommitdiff
path: root/tox.ini
blob: 56a696e3fe1e4a98924ae5fc083b48b7c129586d (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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
[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:py33]
commands =
  lockutils-wrapper \
      python -m testtools.run \
            tests.unit.apiclient.test_auth \
            tests.unit.apiclient.test_base \
            tests.unit.apiclient.test_client \
            tests.unit.apiclient.test_exceptions \
            tests.unit.cache.test_cache \
            tests.unit.cache.test_memory \
            tests.unit.crypto.test_utils \
            tests.unit.reports.test_base_report \
            tests.unit.reports.test_guru_meditation_report \
            tests.unit.reports.test_openstack_generators \
            tests.unit.reports.test_views \
            tests.unit.scheduler.test_base_filter \
            tests.unit.scheduler.test_host_filters \
            tests.unit.scheduler.test_weights \
            tests.unit.test_cliutils \
            tests.unit.test_deprecated \
            tests.unit.test_fileutils \
            tests.unit.test_imageutils \
            tests.unit.test_local \
            tests.unit.test_memorycache \
            tests.unit.test_periodic \
            tests.unit.test_quota \
            tests.unit.test_systemd \
            tests.unit.test_versionutils

[testenv:py34]
commands =
  lockutils-wrapper \
      python -m testtools.run \
            tests.unit.apiclient.test_auth \
            tests.unit.apiclient.test_base \
            tests.unit.apiclient.test_client \
            tests.unit.apiclient.test_exceptions \
            tests.unit.cache.test_cache \
            tests.unit.cache.test_memory \
            tests.unit.crypto.test_utils \
            tests.unit.reports.test_base_report \
            tests.unit.reports.test_guru_meditation_report \
            tests.unit.reports.test_openstack_generators \
            tests.unit.reports.test_views \
            tests.unit.scheduler.test_base_filter \
            tests.unit.scheduler.test_host_filters \
            tests.unit.scheduler.test_weights \
            tests.unit.test_cliutils \
            tests.unit.test_deprecated \
            tests.unit.test_fileutils \
            tests.unit.test_imageutils \
            tests.unit.test_local \
            tests.unit.test_memorycache \
            tests.unit.test_periodic \
            tests.unit.test_quota \
            tests.unit.test_systemd \
            tests.unit.test_versionutils

[testenv:pyflakes]
commands = flake8


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