Migrate from nose to testr.

Run tests with testr for parallel execution.

Part of blueprint grizzly-testtools.

Change-Id: I560592186f2f440049a451a32e58067262ab62d0
This commit is contained in:
Josh Kearney 2013-01-22 11:09:11 -06:00
parent 5526565ac4
commit 3926f35df7
5 changed files with 10 additions and 36 deletions

1
.gitignore vendored
View File

@ -7,6 +7,7 @@
*.swp
*~
.openstackclient-venv
.testrepository
.tox
.venv
AUTHORS

4
.testr.conf Normal file
View File

@ -0,0 +1,4 @@
[DEFAULT]
test_command=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 ${PYTHON:-python} -m subunit.run discover -t ./ ./tests $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list

View File

@ -1,11 +1,3 @@
[nosetests]
cover-package = openstackclient
cover-html = true
cover-erase = true
cover-inclusive = true
verbosity=2
detailed-errors=1
[build_sphinx]
source-dir = doc/source
build-dir = doc/build

View File

@ -52,7 +52,6 @@ setuptools.setup(
install_requires=requires,
dependency_links=dependency_links,
cmdclass=setup.get_cmdclass(),
test_suite="nose.collector",
entry_points={
'console_scripts': ['openstack=openstackclient.shell:main'],
'openstack.cli': [

32
tox.ini
View File

@ -3,14 +3,12 @@ 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
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_ALL=C
deps = -r{toxinidir}/tools/pip-requires
-r{toxinidir}/tools/test-requires
commands = nosetests
commands = python setup.py testr --testr-args='{posargs}'
[testenv:pep8]
deps = pep8==1.1
@ -20,27 +18,7 @@ commands = pep8 --repeat --show-source openstackclient setup.py
commands = {posargs}
[testenv:cover]
commands = nosetests --cover-erase --cover-package=openstackclient --with-xcoverage
commands = python setup.py testr --coverage --testr-args='{posargs}'
[tox:jenkins]
downloadcache = ~/cache/pip
[testenv:jenkins26]
basepython = python2.6
setenv = NOSE_WITH_XUNIT=1
deps = file://{toxinidir}/.cache.bundle
[testenv:jenkins27]
basepython = python2.7
setenv = NOSE_WITH_XUNIT=1
deps = file://{toxinidir}/.cache.bundle
[testenv:jenkinscover]
deps = file://{toxinidir}/.cache.bundle
setenv = NOSE_WITH_XUNIT=1
commands = nosetests --cover-erase --cover-package=openstackclient --with-xcoverage
[testenv:jenkinsvenv]
deps = file://{toxinidir}/.cache.bundle
setenv = NOSE_WITH_XUNIT=1
commands = {posargs}