forked from openstack/networking-odl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
149 lines (130 loc) · 4.97 KB
/
tox.ini
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
[tox]
envlist = docs,py35,py27,pep8
minversion = 1.6
skipsdist = True
[testenv]
setenv = VIRTUAL_ENV={envdir}
PYTHONWARNINGS=default::DeprecationWarning
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
OS_FAIL_ON_MISSING_DEPS OS_POST_MORTEM_DEBUGGER TRACE_FAILONLY
OS_TEST_DBAPI_ADMIN_CONNECTION
usedevelop = True
install_command = {toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
whitelist_externals = bash
commands = {toxinidir}/tools/ostestr_compat_shim.sh {posargs}
# there is also secret magic in ostestr which lets you run in a fail only
# mode. To do this define the TRACE_FAILONLY environmental variable.
[testenv:dsvm]
# Fake job to define environment variables shared between dsvm jobs
setenv = OS_SUDO_TESTING=1
OS_FAIL_ON_MISSING_DEPS=1
OS_LOG_PATH={env:OS_LOG_PATH:/opt/stack/logs}
commands = false
[testenv:functional]
setenv = {[testenv]setenv}
OS_TEST_PATH=./networking_odl/tests/functional
deps = {[testenv]deps}
-r{toxinidir}/networking_odl/tests/functional/requirements.txt
[testenv:dsvm-functional]
basepython = python2.7
setenv = {[testenv:functional]setenv}
{[testenv:dsvm]setenv}
deps =
{[testenv:functional]deps}
[testenv:fullstack]
setenv = {[testenv]setenv}
OS_TEST_TIMEOUT=180
OS_TEST_PATH=./networking_odl/tests/fullstack
commands = ostestr '{posargs}'
deps = {[testenv]deps}
-r{toxinidir}/networking_odl/tests/fullstack/requirements.txt
[testenv:dsvm-fullstack]
setenv = {[testenv:fullstack]setenv}
{[testenv:dsvm]setenv}
commands = ostestr '{posargs}'
deps =
{[testenv:fullstack]deps}
[testenv:pep8]
commands =
flake8
{toxinidir}/tools/coding-checks.sh --pylint '{posargs}'
doc8 doc/source devstack releasenotes/source rally-jobs
neutron-db-manage --subproject networking-odl check_migration
{[testenv:genconfig]commands}
{[testenv:bashate]commands}
{[testenv:capitald]commands}
whitelist_externals =
bash
mkdir
[testenv:i18n]
commands = python ./tools/check_i18n.py ./networking_odl ./tools/i18n_cfg.py
[testenv:venv]
# NOTE(yamahata): translation job can't use zuul-cloner or upper-constraints
install_command = pip install -U -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
commands = {posargs}
[testenv:cover]
commands =
python setup.py test --coverage --coverage-package-name=networking_odl --testr-args='{posargs}'
coverage report --fail-under=80 --skip-covered
[testenv:docs]
commands =
doc8 doc/source devstack releasenotes/source rally-jobs
python setup.py build_sphinx
[testenv:debug]
commands = oslo_debug_helper -t networking_odl/tests {posargs}
[hacking]
import_exceptions = networking_odl._i18n
local-check-factory = networking_odl.hacking.checks.factory
[doc8]
# File extensions to check
extensions = .rst
[flake8]
# TODO(dougwig) -- uncomment this to test for remaining linkages
# N530 direct neutron imports not allowed
show-source = True
ignore = N530
# H106: Dont put vim configuration in source files
# H203: Use assertIs(Not)None to check for None
# H904: Delay string interpolations at logging calls
enable-extensions=H106,H203,H904
exclude=./.*,dist,doc,releasenotes,*lib/python*,*egg,build,tools
[testenv:bashate]
commands = bash -c "find {toxinidir} \
-not \( -type d -name .\* -prune \) \
-type f \
-name \*.sh \
# E005 file does not begin with #! or have a .sh prefix
# E006 check for lines longer than 79 columns
# E042 local declaration hides errors
# E043 Arithmetic compound has inconsistent return semantics
-print0 | xargs -0 bashate -v -iE006 -eE005,E042,E043"
whitelist_externals = bash
[testenv:capitald]
usedevelop = False
skip_install = True
deps =
# Check if "Opendaylight" word is in any file
# Only "OpenDaylight" (with uppercase 'D') should be used
commands = bash -c "! grep \
--exclude-dir='.*' \
--exclude-dir='cover' \
--exclude-dir='__pycache__' \
--exclude='tox.ini' \
--exclude='ChangeLog' \
--exclude='*.py' \
--exclude='*.pyc' \
--recursive \
--line-number \
Opendaylight \
{toxinidir}"
whitelist_externals = bash
[testenv:genconfig]
deps = -r{toxinidir}/requirements.txt
commands =
mkdir -p etc/neutron/plugins/ml2
oslo-config-generator --namespace ml2_odl --output-file etc/neutron/plugins/ml2/ml2_conf_odl.ini.sample
whitelist_externals = mkdir
[testenv:releasenotes]
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html