Fix coverage jobs. Also, clean up the tox.ini.

Change-Id: I85e8f1b190e2c5f598ae76f2920dfbe7c4ed1500
This commit is contained in:
Monty Taylor 2012-06-03 09:54:51 -04:00
parent 41d285ab02
commit 66108d0e48
5 changed files with 28 additions and 29 deletions

6
.coveragerc Normal file
View File

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

6
.gitignore vendored
View File

@ -4,7 +4,13 @@
.glance-venv
.venv
.tox
.coverage
cover/*
nosetests.xml
coverage.xml
glance.sqlite
AUTHORS
ChangeLog
build
dist
*.egg

View File

@ -29,8 +29,6 @@ output_file = glance/locale/glance.pot
# 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
openstack-color=1
cover-package = glance
cover-html = true
cover-erase = true

View File

@ -5,10 +5,10 @@ distribute>=0.6.24
Babel
# Needed for testing
coverage
mox
nose
nose-exclude
nosexcover
openstack.nose_plugin
pep8==1.1
sphinx>=1.1.2

35
tox.ini
View File

@ -3,35 +3,24 @@ 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/pip-requires
-r{toxinidir}/tools/test-requires
commands = {toxinidir}/run_tests.sh -N
[testenv:pep8]
deps = pep8==1.1
commands = pep8 --repeat --show-source bin glance setup.py
[testenv:cover]
commands = nosetests --with-coverage --cover-html --cover-erase --cover-package=glance
[testenv:venv]
commands = {posargs}
commands = nosetests {posargs}
[tox:jenkins]
downloadcache = ~/cache/pip
[testenv:jenkins26]
basepython = python2.6
deps = file://{toxinidir}/.cache.bundle
[testenv:pep8]
deps = pep8==1.1
commands = pep8 --repeat --show-source --exclude=.venv,.tox,dist,doc .
[testenv:jenkins27]
basepython = python2.7
deps = file://{toxinidir}/.cache.bundle
[testenv:cover]
setenv = NOSE_WITH_COVERAGE=1
[testenv:jenkinscover]
deps = file://{toxinidir}/.cache.bundle
commands = nosetests --cover-erase --cover-package=glance --with-xcoverage
[testenv:jenkinsvenv]
deps = file://{toxinidir}/.cache.bundle
[testenv:venv]
commands = {posargs}