blazar-nova/tox.ini
Pierre Riteau dd08b76fc9 Remove nova tarball from test-requirements
Using test-requirements to get a specific version of nova for tests is
preventing DevStack from installing blazar-nova, because nova is already
added to upper-constraints.txt as "-e file:///opt/stack/nova#egg=nova".
DevStack shows the following error message:

    Could not satisfy constraints for 'nova': installation from path or url cannot be constrained to a version

Import tools/tox_install.sh from Neutron repos and adapt it to install
Nova in tox environments used for unit tests. Minimal modifications were
made to this script in order to easily track changes from Neutron repos.

tox.ini is modified to use this script instead of pip. For pep8 checks,
we exclude the .tmp directory where nova is cloned in gate jobs,
otherwise the nova source is checked as well and triggers failures.

See [1] and [2] for more details about the issue fixed by this commit.

[1] https://bugs.launchpad.net/devstack/+bug/1540328/comments/13
[2] https://review.openstack.org/#/c/405630/1

Closes-Bug: #1641577
Change-Id: I542461e609866b21f597b0c4a2954807c5b8f8b7
2017-01-23 10:23:01 +00:00

34 lines
882 B
INI

[tox]
envlist = py35,py34,py27,pep8
minversion = 2.0
skipsdist = True
[testenv]
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}/test-requirements.txt
-r{toxinidir}/requirements.txt
setenv = VIRTUAL_ENV={envdir}
EVENTLET_NO_GREENDNS=yes
PYTHONHASHSEED=0
commands =
python setup.py testr --slowest --testr-args="{posargs}"
sitepackages = False
[testenv:cover]
commands = python setup.py testr --coverage --testr-args="{posargs}"
[testenv:pep8]
commands = flake8 {posargs}
[testenv:venv]
commands = {posargs}
[flake8]
show-source = true
builtins = _
exclude = .venv,.git,.tmp,.tox,dist,doc,*lib/python*,*egg,tools
[hacking]
import_exceptions = nova.openstack.common.gettextutils