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:
parent
5526565ac4
commit
3926f35df7
|
@ -7,6 +7,7 @@
|
||||||
*.swp
|
*.swp
|
||||||
*~
|
*~
|
||||||
.openstackclient-venv
|
.openstackclient-venv
|
||||||
|
.testrepository
|
||||||
.tox
|
.tox
|
||||||
.venv
|
.venv
|
||||||
AUTHORS
|
AUTHORS
|
||||||
|
|
|
@ -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
|
|
@ -1,11 +1,3 @@
|
||||||
[nosetests]
|
|
||||||
cover-package = openstackclient
|
|
||||||
cover-html = true
|
|
||||||
cover-erase = true
|
|
||||||
cover-inclusive = true
|
|
||||||
verbosity=2
|
|
||||||
detailed-errors=1
|
|
||||||
|
|
||||||
[build_sphinx]
|
[build_sphinx]
|
||||||
source-dir = doc/source
|
source-dir = doc/source
|
||||||
build-dir = doc/build
|
build-dir = doc/build
|
||||||
|
|
1
setup.py
1
setup.py
|
@ -52,7 +52,6 @@ setuptools.setup(
|
||||||
install_requires=requires,
|
install_requires=requires,
|
||||||
dependency_links=dependency_links,
|
dependency_links=dependency_links,
|
||||||
cmdclass=setup.get_cmdclass(),
|
cmdclass=setup.get_cmdclass(),
|
||||||
test_suite="nose.collector",
|
|
||||||
entry_points={
|
entry_points={
|
||||||
'console_scripts': ['openstack=openstackclient.shell:main'],
|
'console_scripts': ['openstack=openstackclient.shell:main'],
|
||||||
'openstack.cli': [
|
'openstack.cli': [
|
||||||
|
|
32
tox.ini
32
tox.ini
|
@ -3,14 +3,12 @@ envlist = py26,py27,pep8
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
setenv = VIRTUAL_ENV={envdir}
|
setenv = VIRTUAL_ENV={envdir}
|
||||||
NOSE_WITH_OPENSTACK=1
|
LANG=en_US.UTF-8
|
||||||
NOSE_OPENSTACK_COLOR=1
|
LANGUAGE=en_US:en
|
||||||
NOSE_OPENSTACK_RED=0.05
|
LC_ALL=C
|
||||||
NOSE_OPENSTACK_YELLOW=0.025
|
|
||||||
NOSE_OPENSTACK_SHOW_ELAPSED=1
|
|
||||||
deps = -r{toxinidir}/tools/pip-requires
|
deps = -r{toxinidir}/tools/pip-requires
|
||||||
-r{toxinidir}/tools/test-requires
|
-r{toxinidir}/tools/test-requires
|
||||||
commands = nosetests
|
commands = python setup.py testr --testr-args='{posargs}'
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
deps = pep8==1.1
|
deps = pep8==1.1
|
||||||
|
@ -20,27 +18,7 @@ commands = pep8 --repeat --show-source openstackclient setup.py
|
||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
[testenv:cover]
|
[testenv:cover]
|
||||||
commands = nosetests --cover-erase --cover-package=openstackclient --with-xcoverage
|
commands = python setup.py testr --coverage --testr-args='{posargs}'
|
||||||
|
|
||||||
[tox:jenkins]
|
[tox:jenkins]
|
||||||
downloadcache = ~/cache/pip
|
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}
|
|
||||||
|
|
Loading…
Reference in New Issue