Skip to content

Commit

Permalink
Align tox.ini and fix coverage jobs in jenkins.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
emonty committed Jun 9, 2012
1 parent f7757e4 commit e7180a5
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 33 deletions.
6 changes: 6 additions & 0 deletions .coveragerc
@@ -0,0 +1,6 @@
[run]
branch = True
omit = /usr*,setup.py,*egg*,.venv/*,.tox/*,test/*

[report]
ignore-errors = True
8 changes: 3 additions & 5 deletions setup.cfg
Expand Up @@ -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 changes: 14 additions & 28 deletions tox.ini
Expand Up @@ -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}

0 comments on commit e7180a5

Please sign in to comment.