Fixed setup, tox and requirements

It is now up-to-date with the current test process, versions and
configurations.

Change-Id: I927e99b390a9e2224dfcb6bcde33cbe9d012c53f
This commit is contained in:
Flaper Fesp 2013-02-25 15:47:39 +01:00
parent 76d1107f31
commit 693582e1c4
5 changed files with 30 additions and 26 deletions

6
.coveragerc Normal file
View File

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

View File

@ -1,4 +0,0 @@
[DEFAULT]
test_command=python -m subunit.run discover . $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list

View File

@ -17,14 +17,8 @@
from setuptools import setup, find_packages from setuptools import setup, find_packages
from marconi.openstack.common import setup as common_setup from marconi.openstack.common import setup as common_setup
install_requires = common_setup.parse_requirements(['tools/pip-requires']) requires = common_setup.parse_requirements()
tests_require = common_setup.parse_requirements(['tools/test-requires']) dependency_links = common_setup.parse_dependency_links()
setup_require = common_setup.parse_requirements(['tools/setup-requires'])
dependency_links = common_setup.parse_dependency_links([
'tools/pip-requires',
'tools/test-requires',
'tools/setup-requires'
])
setup( setup(
name='marconi', name='marconi',
@ -36,10 +30,7 @@ setup(
packages=find_packages(exclude=['bin']), packages=find_packages(exclude=['bin']),
include_package_data=True, include_package_data=True,
test_suite='nose.collector', test_suite='nose.collector',
setup_requires=setup_require, install_requires=requires,
install_requires=install_requires,
tests_require=tests_require,
extras_require={'test': tests_require},
dependency_links=dependency_links, dependency_links=dependency_links,
cmdclass=common_setup.get_cmdclass(), cmdclass=common_setup.get_cmdclass(),
) )

View File

@ -6,3 +6,6 @@ pep8==1.3.3
python-subunit python-subunit
testrepository testrepository
testtools testtools
nose
nose-exclude
openstack.nose_plugin

28
tox.ini
View File

@ -2,19 +2,27 @@
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
NOSE_OPENSTACK_STDOUT=1
deps = -r{toxinidir}/tools/pip-requires deps = -r{toxinidir}/tools/pip-requires
-r{toxinidir}/tools/test-requires -r{toxinidir}/tools/test-requires
setenv = VIRTUAL_ENV={envdir} commands = nosetests {posargs}
OS_STDOUT_NOCAPTURE=False
OS_STDERR_NOCAPTURE=False
OS_LOG_NOCAPTURE=False
commands = bash -c 'if [ ! -d .testrepository ] ; then testr init ; fi'
bash -c 'testr run --parallel ; RET=$? ; echo "Slowest Tests" ; testr slowest && exit $RET'
sitepackages = True
[testenv:cover] [tox:jenkins]
commands = nosetests --no-path-adjustment --with-coverage --cover-erase --cover-package=marconi --cover-inclusive [] downloadcache = ~/cache/pip
[testenv:pep8] [testenv:pep8]
deps = pep8==1.3.3 deps = pep8==1.3.3
commands = pep8 --repeat --show-source --exclude=.venv,.tox,dist,doc,openstack . commands =
pep8 --ignore=E125,E126,E711,E712 --repeat --show-source --exclude=.venv,.tox,dist,doc,openstack .
[testenv:cover]
setenv = NOSE_WITH_COVERAGE=1
[testenv:venv]
commands = {posargs}