Migrating to testr

Unit Tests and coverage will be launched using testr now.

Change-Id: Ib7397181de1137b94bb791cc532384c69679dcda
Fixes: bug #1259921
This commit is contained in:
Nikita Konovalov 2013-12-11 16:50:53 +04:00
parent ff4ceadaa7
commit e2987a15ed
4 changed files with 14 additions and 2 deletions

2
.gitignore vendored
View File

@ -42,5 +42,7 @@ tools/lintstack.head.py
tools/pylint_exceptions
savanna/tests/cover
savanna/tests/coverage.xml
cover
htmlcov
savanna/openstack/common/db/savanna.sqlite
.testrepository

7
.testr.conf Executable file
View File

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

View File

@ -1,6 +1,7 @@
hacking>=0.8.0,<0.9
coverage>=3.6
discover
docutils==0.9.1
fixtures>=0.3.14
mock>=1.0
@ -10,6 +11,7 @@ oslo.sphinx
pylint==0.25.2
sphinx>=1.1.2,<1.2
sphinxcontrib-httpdomain
testrepository>=0.0.17
unittest2
python-savannaclient>=0.4.0

View File

@ -18,7 +18,7 @@ setenv =
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = nosetests -w unit {posargs}
commands = python setup.py test --slowest --testr-args="{posargs}"
[testenv:integration]
setenv =
@ -33,7 +33,8 @@ setenv =
commands = nosetests -w integration -x {posargs}
[testenv:cover]
setenv = NOSE_WITH_COVERAGE=1
VIRTUAL_ENV={envdir}
commands = python setup.py testr --coverage --testr-args='{posargs}'
[tox:jenkins]
downloadcache = ~/cache/pip