summaryrefslogtreecommitdiff
path: root/tox.ini
blob: 0a9c252442fb3fb06bd5e40d95b0f48ccdc09790 (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
[tox]
envlist = py36,py27,pep8
minversion = 3.1.1
skipsdist = True
# Automatic envs (pyXX) will use the python version appropriate to that
# env and ignore basepython inherited from [testenv]. That's what we
# want, and we don't need to be warned about it.
ignore_basepython_conflict = True

[testenv]
basepython = python3
setenv =
  VIRTUAL_ENV={envdir}
  LANGUAGE=en_US
  LC_ALL=en_US.utf-8
  OS_STDOUT_CAPTURE=1
  OS_STDERR_CAPTURE=1
  OS_TEST_TIMEOUT=60
usedevelop = True
install_command = pip install {opts} {packages}
deps =
  -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
  -r{toxinidir}/requirements.txt
  -r{toxinidir}/test-requirements.txt
  -egit+https://git.openstack.org/openstack/neutron#egg=neutron
  -rhttps://git.openstack.org/cgit/openstack/neutron/plain/test-requirements.txt
whitelist_externals =
  bash
  find
commands =
  find . -type f -name "*.pyc" -delete

[testenv:py27]
commands =
  {[testenv]commands}
  stestr run {posargs}
  stestr slowest

[testenv:py35]
commands =
  {[testenv]commands}
  stestr run {posargs}
  stestr slowest

[testenv:py36]
commands =
  {[testenv]commands}
  stestr run {posargs}
  stestr slowest

[testenv:py37]
commands =
  {[testenv]commands}
  stestr run {posargs}
  stestr slowest

[testenv:pep8]
commands = flake8

[testenv:cover]
setenv =
  {[testenv]setenv}
  PYTHON=coverage run --source networking_powervm --parallel-mode
commands =
  coverage erase
  stestr run {posargs}
  coverage combine
  coverage html -d cover
  coverage xml -o cover/coverage.xml
  coverage report

[testenv:venv]
commands = {posargs}

[testenv:docs]
deps =
  -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
  -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -W -b html doc/source doc/build/html

[testenv:bashate]
commands =
  bash -c "ls devstack/*.sh | xargs bashate -v {posargs}"
whitelist_externals = bash

[flake8]
# N530 direct neutron imports not allowed
# W504 line break after binary operator
# It's either ^ or W503 (line break *before* binary operator). Match neutron.
ignore = N530,W504
enable-extensions = H106,H203,H204,H205,H904
show-source = true
exclude = ./.*,build,dist,doc
import-order-style = pep8

[hacking]
local-check-factory = networking_powervm.hacking.checks.factory

[testenv:lower-constraints]
deps =
  -c{toxinidir}/lower-constraints.txt
  -r{toxinidir}/test-requirements.txt
  -r{toxinidir}/requirements.txt
  -egit+https://git.openstack.org/openstack/neutron#egg=neutron
  -rhttps://git.openstack.org/cgit/openstack/neutron/plain/test-requirements.txt