Align tox with standards.

Moved openstack nose invocation to tox.ini from setup.cfg, as there
is no way to turn it off if it's in setup.cfg, and when we're running
in jenkins, we want to run via xunit and not via openstack color output.

Change-Id: I0a7b6232834b5cdfc97be9c2f93f726d6b47e0ac
This commit is contained in:
Monty Taylor 2012-05-16 11:42:30 -04:00
parent fa43d08dcb
commit 878c939e2c
3 changed files with 28 additions and 11 deletions

View File

@ -5,8 +5,3 @@
# openstack-nose https://github.com/jkoelker/openstack-nose
verbosity=2
detailed-errors=1
with-openstack=1
openstack-red=0.05
openstack-yellow=0.025
openstack-show-elapsed=1

View File

@ -1,7 +1,11 @@
coverage
nose
nosexcover
pep8==0.6.1
distribute>=0.6.24
mox
nose
nose-exclude
nosexcover
openstack.nose_plugin
pep8==0.6.1
sphinx>=1.1.2
-e git+https://review.openstack.org/p/openstack-dev/openstack-nose.git#egg=openstack.nose_plugin
-e git+https://review.openstack.org/p/openstack/quantum#egg=quantum-dev

20
tox.ini
View File

@ -2,6 +2,13 @@
envlist = py26,py27,pep8
[testenv]
setenv =
VIRTUAL_ENV={envdir}
NOSE_WITH_OPENSTACK=1
NOSE_OPENSTACK_COLOR=1
NOSE_OPENSTACK_RED=0.05
NOSE_OPENSTACK_YELLOW=0.025
NOSE_OPENSTACK_SHOW_ELAPSED=1
deps =
-r{toxinidir}/tools/test-requires
commands = nosetests
@ -11,20 +18,25 @@ commands =
pep8 --exclude=vcsversion.py,*.pyc --repeat --show-source quantumclient \
setup.py version.py
[testenv:venv]
commands = {posargs}
[testenv:cover]
commands =
nosetests --with-coverage --cover-html --cover-erase \
--cover-package=quantumclient
[testenv:hudson]
[tox:jenkins]
downloadcache = ~/cache/pip
[testenv:jenkins26]
basepython = python2.6
setenv = NOSE_WITH_XUNIT=1
deps = file://{toxinidir}/.cache.bundle
[testenv:jenkins27]
basepython = python2.7
setenv = NOSE_WITH_XUNIT=1
deps = file://{toxinidir}/.cache.bundle
[testenv:jenkinspep8]
@ -35,5 +47,11 @@ commands =
[testenv:jenkinscover]
deps = file://{toxinidir}/.cache.bundle
setenv = NOSE_WITH_XUNIT=1
commands =
nosetests --cover-erase --cover-package=quantumclient --with-xcoverage
[testenv:jenkinsvenv]
deps = file://{toxinidir}/.cache.bundle
setenv = NOSE_WITH_XUNIT=1
commands = {posargs}