Chris Dent a95db6e3bc Add a tox target for testing against openstack placement
The openstack placement service is one of the larger consumers of gabbi.
This change adds a 'placement' tox target get retrieves the latest code
that provides placement and runs the relevant gabbi tests against it.

The target is added to the "allowed to fail" section travis.

This is considerably more complex than the gnocchi target (which does a
similar thing) because this gets the master tarball rather than cloning
the git repo. The clone takes far too long because the curren thost of
the placement service, nova, is very large and very old.
2017-07-17 16:08:57 +01:00

92 lines
2.4 KiB
INI

[tox]
minversion = 1.6
skipsdist = True
envlist = py27,py33,py34,py35,py36,pypy,pep8,limit,failskip,docs,py35-prefix,py35-limit,py35-failskip,py27-pytest,py35-pytest,py36-pytest
[testenv]
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
whitelist_externals = rm
install_command = pip install -U {opts} {packages}
commands =
rm -f .testrepository/times.dbm
python setup.py testr --testr-args="{posargs}"
setenv = GABBI_PREFIX=
passenv = GABBI_* HOME
[testenv:venv]
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = {posargs}
[testenv:py27-pytest]
commands = py.test gabbi
[testenv:py35-pytest]
commands = py.test gabbi
[testenv:py36-pytest]
commands = py.test gabbi
[testenv:py35-prefix]
setenv = GABBI_PREFIX=/snoopy
[testenv:pep8]
deps = hacking
commands =
flake8
[testenv:limit]
commands = {toxinidir}/test-limit.sh
[testenv:failskip]
commands = {toxinidir}/test-failskip.sh
[testenv:py35-limit]
commands = {toxinidir}/test-limit.sh
[testenv:py35-failskip]
commands = {toxinidir}/test-failskip.sh
[testenv:cover]
commands = python setup.py testr --coverage --testr-args="{posargs}"
[testenv:pytest-cov]
commands = py.test --cov=gabbi gabbi/tests --cov-config .coveragerc --cov-report html
[testenv:gnocchi]
basepython = python2.7
deps = -egit+https://github.com/gnocchixyz/gnocchi#egg=gnocchi
tox
changedir = {envdir}/src/gnocchi
commands = tox -e py27-gabbi --notest # ensure a virtualenv is built
{envdir}/src/gnocchi/.tox/py27-gabbi/bin/pip install -U {toxinidir} # install gabbi
tox -e py27-gabbi
[testenv:placement]
basepython = python2.7
deps = tox
commands = -mkdir {envdir}/src
-rm -r {envdir}/src/*
curl -o {envdir}/src/nova.tar.gz https://tarballs.openstack.org/nova/nova-master.tar.gz
tar -C {envdir}/src -zxv --strip-components 1 -f nova.tar.gz
tox -c {envdir}/src -e functional --notest # ensure a virtualenv is built
{envdir}/src/.tox/functional/bin/pip install -U {toxinidir} # install gabbi
tox -c {envdir}/src -e functional test_placement_api
whitelist_externals =
mkdir
curl
tar
[testenv:docs]
commands =
rm -rf doc/build
python setup.py build_sphinx
whitelist_externals =
rm
[flake8]
ignore = H405,E126
exclude=.venv,.git,.tox,dist,*egg,*.egg-info,build,examples,docs
show-source = True