Permalink
Browse files

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
  • Loading branch information...
1 parent fa43d08 commit 878c939e2c6dcbbf4e0792b04a070af90c72fba6 @emonty emonty committed May 16, 2012
Showing with 25 additions and 8 deletions.
  1. +0 −5 setup.cfg
  2. +6 −2 tools/test-requires
  3. +19 −1 tox.ini
View
5 setup.cfg
@@ -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
8 tools/test-requires
@@ -1,7 +1,11 @@
-coverage
+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
View
20 tox.ini
@@ -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}

0 comments on commit 878c939

Please sign in to comment.