blob: 9c21dac049c5e5528420ede3a7d8d7fb17453d5a [file] [log] [blame]
Kiall Mac Innes25fb29e2016-04-07 08:07:04 +01001[tox]
Tony Breedsde55ca22016-12-20 15:42:54 +11002minversion = 2.0
Kiall Mac Innes25fb29e2016-04-07 08:07:04 +01003envlist = py34,py27,flake8
4skipsdist = True
5
6[testenv]
7usedevelop = True
Tony Breedsde55ca22016-12-20 15:42:54 +11008install_command = {toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
Kiall Mac Innes25fb29e2016-04-07 08:07:04 +01009deps = -r{toxinidir}/requirements.txt
10 -r{toxinidir}/test-requirements.txt
11setenv =
Tony Breedsde55ca22016-12-20 15:42:54 +110012 VIRTUAL_ENV={envdir}
13 BRANCH_NAME=master
14 CLIENT_NAME=designate-tempest-plugin
Kiall Mac Innes25fb29e2016-04-07 08:07:04 +010015 PYTHONDONTWRITEBYTECODE=1
16whitelist_externals = sh
17 find
18 rm
19commands =
20 find . -type f -name "*.pyc" -delete
21 sh tools/pretty_tox.sh '{posargs}'
22passenv = http_proxy
23 HTTP_PROXY
24 https_proxy
25 HTTPS_PROXY
26 no_proxy
27 NO_PROXY
28 OS_DEBUG
29 OS_LOG_CAPTURE
30 OS_STDERR_CAPTURE
31 OS_STDOUT_CAPTURE
32
33[testenv:pep8]
34basepython = python2.7
35commands = sh tools/pretty_flake8.sh
36
37[testenv:bashate]
38deps = bashate
39whitelist_externals = bash
40commands = bash -c "find {toxinidir}/devstack \
41 -not \( -type d -name .?\* -prune \) \
42 -not \( -type d -name doc -prune \) \
43 -type f \
44 -not -name \*~ \
45 -not -name \*.md \
46 \( \
47 -name \*.sh -or \
48 -name \*rc -or \
49 -name functions\* -or \
50 -wholename \*/lib/\* \
51 \) \
52 -print0 | xargs -0 bashate -v"
53
54[testenv:pip-check-reqs]
55# do not install test-requirements as that will pollute the virtualenv for
56# determining missing packages
57# this also means that pip-missing-reqs must be installed separately, outside
58# of the requirements.txt files
59deps = pip-check-reqs
60 -r{toxinidir}/requirements.txt
61commands=pip-missing-reqs -d --ignore-file=designate/tests/* designate
62
63[testenv:venv]
64commands = {posargs}
65
66[flake8]
67# ignored flake8 codes:
68# H302 import only modules
69# H306 imports not in alphabetical order
70# H402 one line docstring needs punctuation
71# H404 multi line docstring should start with a summary
72# H405 multi line docstring summary not separated with an empty line
73# H904 Wrap long lines in parentheses instead of a backslash
74# E126 continuation line over-indented for hanging indent
75# E128 continuation line under-indented for visual indent
76
77ignore = H302,H306,H402,H404,H405,H904,E126,E128
78exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*openstack/deprecated*,*lib/python*,*egg,build,tools,.ropeproject
Kiall Mac Innesa17f2332016-08-25 13:34:42 +010079
80
81[hacking]
82local-check-factory = designate_tempest_plugin.hacking.checks.factory
83