Updated tox.ini to work properly with Jenkins.

As part of doing that, fixed a unittest to work with python2.6.
Change-Id: I575a8534bf008077c1a24a25336f1d711f742297
This commit is contained in:
Monty Taylor 2012-03-21 10:34:46 -04:00
parent be21f14cea
commit 9f5a6761d9
3 changed files with 42 additions and 21 deletions

View File

@ -1,6 +1,5 @@
[nosetests]
cover-package = keystoneclient
cover-html = true
cover-erase = true
cover-inclusive = true

View File

@ -13,16 +13,16 @@ if sys.version_info < (2, 7):
requirements.append('argparse')
setup(
name = "python-keystoneclient",
version = "2012.1",
description = "Client library for OpenStack Keystone API",
long_description = read('README.rst'),
url = 'https://github.com/openstack/python-keystoneclient',
license = 'Apache',
author = 'Nebula Inc, based on work by Rackspace and Jacob Kaplan-Moss',
author_email = 'gabriel.hurley@nebula.com',
packages = find_packages(exclude=['tests', 'tests.*']),
classifiers = [
name="python-keystoneclient",
version="2012.1",
description="Client library for OpenStack Keystone API",
long_description=read('README.rst'),
url='https://github.com/openstack/python-keystoneclient',
license='Apache',
author='Nebula Inc, based on work by Rackspace and Jacob Kaplan-Moss',
author_email='gabriel.hurley@nebula.com',
packages=find_packages(exclude=['tests', 'tests.*']),
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Developers',
@ -31,12 +31,12 @@ setup(
'Operating System :: OS Independent',
'Programming Language :: Python',
],
install_requires = requirements,
install_requires=requirements,
tests_require = ["nose", "mock", "mox"],
test_suite = "nose.collector",
tests_require=["nose", "mock", "mox"],
test_suite="nose.collector",
entry_points = {
entry_points={
'console_scripts': ['keystone = keystoneclient.shell:main']
}
)

34
tox.ini
View File

@ -1,14 +1,36 @@
[tox]
envlist = py26,py27
envlist = py26,py27,pep8
[testenv]
setenv = VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/tools/pip-requires
commands = /bin/bash run_tests.sh -N
commands = nosetests {posargs}
[testenv:pep8]
deps = pep8
commands = /bin/bash run_tests.sh -N --pep8
commands = pep8 --repeat --show-source keystoneclient setup.py
[testenv:coverage]
deps = pep8
commands = /bin/bash run_tests.sh -N --with-coverage
[testenv:cover]
commands = nosetests --with-xcoverage {posargs}
[testenv:venv]
commands = {posargs}
[testenv:hudson]
downloadcache = ~/cache/pip
[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 --with-xcoverage {posargs}
[testenv:jenkinsvenv]
deps = file://{toxinidir}/.cache.bundle
commands = {posargs}