Align tox.ini and fix coverage jobs in jenkins.

The jenkins coverage jobs expect there to be a .coverage file, so deleting
it is a bad idea. Also, coverage erase will do that for us.
While we're in there, update tox.ini and setup.cfg to the latest.

Change-Id: Icd0a8fc66a5146e0d94f62a9f65a4536981d2916
This commit is contained in:
Monty Taylor 2012-06-08 19:59:26 -04:00
parent f7757e4ebf
commit e7180a5876
3 changed files with 23 additions and 33 deletions

6
.coveragerc Normal file
View File

@ -0,0 +1,6 @@
[run]
branch = True
omit = /usr*,setup.py,*egg*,.venv/*,.tox/*,test/*
[report]
ignore-errors = True

View File

@ -26,8 +26,6 @@ output_file = locale/swift.pot
exe=1
verbosity=2
detailed-errors=1
with-openstack=1
openstack-red=0.05
openstack-yellow=0.025
openstack-show-elapsed=1
openstack-color=1
cover-package = swift
cover-html = true
cover-erase = true

42
tox.ini
View File

@ -2,43 +2,29 @@
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
NOSE_OPENSTACK_STDOUT=1
deps =
-r{toxinidir}/tools/pip-requires
-r{toxinidir}/tools/test-requires
commands = nosetests test/unit []
commands = nosetests test/unit {posargs}
[tox:jenkins]
downloadcache = ~/cache/pip
[testenv:pep8]
deps = pep8==0.6.1
deps = pep8==1.1
commands =
pep8 --repeat --show-pep8 --show-source swift tools setup.py
pep8 --repeat --show-source --exclude=.venv,.tox,dist,doc,test .
pep8 --repeat --show-pep8 --show-source --filename=swift* bin
[testenv:cover]
commands =
coverage erase
nosetests test/unit --with-coverage --cover-html --cover-erase \
--cover-package=swift
/bin/rm -f .coverage
[testenv:hudson]
downloadcache = ~/cache/pip
setenv = NOSE_WITH_COVERAGE=1
[testenv:venv]
commands = {posargs}
[testenv:jenkins26]
basepython = python2.6
deps = file://{toxinidir}/.cache.bundle
[testenv:jenkins27]
basepython = python2.7
deps = file://{toxinidir}/.cache.bundle
[testenv:jenkinscover]
deps = file://{toxinidir}/.cache.bundle
commands =
nosetests test/unit --with-xcoverage --cover-erase --cover-package=swift
[testenv:jenkinsvenv]
deps = file://{toxinidir}/.cache.bundle
commands = {posargs}