summaryrefslogtreecommitdiffstats
path: root/networking-odl/tox.ini
blob: 644dbf3b848fc6cacf4b7d104e7ccc3fabeb163b (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
[tox]
envlist = docs,py35,py34,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
usedevelop = True
install_command = pip install -r requirements.txt -U {opts} {packages}
deps = -egit+https://git.openstack.org/openstack/neutron#egg=neutron
       -egit+https://git.openstack.org/openstack/neutron-fwaas#egg=neutron-fwaas
       -egit+https://git.openstack.org/openstack/neutron-lbaas#egg=neutron-lbaas
       -egit+https://git.openstack.org/openstack/networking-l2gw#egg=networking-l2gw
       -r{toxinidir}/test-requirements.txt
whitelist_externals = bash
commands = bash tools/pretty_tox.sh '{posargs}'

[testenv:pep8]
commands =
  flake8
  doc8 doc/source devstack releasenotes/source rally-jobs
  neutron-db-manage --subproject networking-odl check_migration

[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 {opts} {packages}
commands = {posargs}

[testenv:cover]
commands =
  python setup.py test --coverage --coverage-package-name=networking_odl --testr-args='{posargs}'
  coverage report

[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 = neutron_lib.hacking.checks.factory

[doc8]
# File extensions to check
extensions = .rst

[flake8]
# H803 skipped on purpose per list discussion.
# E123, E125 skipped as they are invalid PEP-8.
# TODO(dougwig) -- uncomment this to test for remaining linkages
# N530 direct neutron imports not allowed
show-source = True
ignore = E123,E125,H803,N530
exclude=./.*,dist,doc,releasenotes,*lib/python*,*egg,build,tools

[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