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 # openstack-nose https://github.com/jkoelker/openstack-nose
verbosity=2 verbosity=2
detailed-errors=1 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 distribute>=0.6.24
nose
nosexcover mox
pep8==0.6.1 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 -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 envlist = py26,py27,pep8
[testenv] [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 = deps =
-r{toxinidir}/tools/test-requires -r{toxinidir}/tools/test-requires
commands = nosetests commands = nosetests
@@ -11,20 +18,25 @@ commands =
pep8 --exclude=vcsversion.py,*.pyc --repeat --show-source quantumclient \ pep8 --exclude=vcsversion.py,*.pyc --repeat --show-source quantumclient \
setup.py version.py setup.py version.py
[testenv:venv]
commands = {posargs}
[testenv:cover] [testenv:cover]
commands = commands =
nosetests --with-coverage --cover-html --cover-erase \ nosetests --with-coverage --cover-html --cover-erase \
--cover-package=quantumclient --cover-package=quantumclient
[testenv:hudson] [tox:jenkins]
downloadcache = ~/cache/pip downloadcache = ~/cache/pip
[testenv:jenkins26] [testenv:jenkins26]
basepython = python2.6 basepython = python2.6
setenv = NOSE_WITH_XUNIT=1
deps = file://{toxinidir}/.cache.bundle deps = file://{toxinidir}/.cache.bundle
[testenv:jenkins27] [testenv:jenkins27]
basepython = python2.7 basepython = python2.7
setenv = NOSE_WITH_XUNIT=1
deps = file://{toxinidir}/.cache.bundle deps = file://{toxinidir}/.cache.bundle
[testenv:jenkinspep8] [testenv:jenkinspep8]
@@ -35,5 +47,11 @@ commands =
[testenv:jenkinscover] [testenv:jenkinscover]
deps = file://{toxinidir}/.cache.bundle deps = file://{toxinidir}/.cache.bundle
setenv = NOSE_WITH_XUNIT=1
commands = commands =
nosetests --cover-erase --cover-package=quantumclient --with-xcoverage nosetests --cover-erase --cover-package=quantumclient --with-xcoverage
[testenv:jenkinsvenv]
deps = file://{toxinidir}/.cache.bundle
setenv = NOSE_WITH_XUNIT=1
commands = {posargs}