Merge "Migrate to stestr"
This commit is contained in:
commit
c83d139273
2
.gitignore
vendored
2
.gitignore
vendored
@ -30,7 +30,7 @@ keystone/tests/tmp/
|
|||||||
.project
|
.project
|
||||||
.pydevproject
|
.pydevproject
|
||||||
keystone/locale/*/LC_MESSAGES/*.mo
|
keystone/locale/*/LC_MESSAGES/*.mo
|
||||||
.testrepository/
|
.stestr/
|
||||||
*.db
|
*.db
|
||||||
# Files created by releasenotes build
|
# Files created by releasenotes build
|
||||||
releasenotes/build
|
releasenotes/build
|
||||||
|
4
.stestr.conf
Normal file
4
.stestr.conf
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
[DEFAULT]
|
||||||
|
test_path=${OS_TEST_PATH:-./keystone/tests/unit}
|
||||||
|
top_dir=./
|
||||||
|
group_regex=.*(test_cert_setup)
|
16
.testr.conf
16
.testr.conf
@ -1,16 +0,0 @@
|
|||||||
[DEFAULT]
|
|
||||||
test_command=
|
|
||||||
${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./keystone/tests/unit} $LISTOPT $IDOPTION
|
|
||||||
|
|
||||||
test_id_option=--load-list $IDFILE
|
|
||||||
test_list_option=--list
|
|
||||||
group_regex=.*(test_cert_setup)
|
|
||||||
|
|
||||||
|
|
||||||
# NOTE(morganfainberg): If single-worker mode is wanted (e.g. for live tests)
|
|
||||||
# the environment variable ``TEST_RUN_CONCURRENCY`` should be set to ``1``. If
|
|
||||||
# a non-default (1 worker per available core) concurrency is desired, set
|
|
||||||
# environment variable ``TEST_RUN_CONCURRENCY`` to the desired number of
|
|
||||||
# workers.
|
|
||||||
test_run_concurrency=echo ${TEST_RUN_CONCURRENCY:-0}
|
|
||||||
|
|
@ -56,3 +56,12 @@ callable we prefer that the call also uses keyword arg syntax. For example::
|
|||||||
|
|
||||||
This gives us the flexibility to re-order arguments and more importantly
|
This gives us the flexibility to re-order arguments and more importantly
|
||||||
to add new required arguments. It's also more explicit and easier to read.
|
to add new required arguments. It's also more explicit and easier to read.
|
||||||
|
|
||||||
|
Testing
|
||||||
|
-------
|
||||||
|
|
||||||
|
keystone uses testtools and stestr for its unittest suite and its test
|
||||||
|
runner. If you'd like to learn more in depth:
|
||||||
|
|
||||||
|
https://testtools.readthedocs.io/en/latest/
|
||||||
|
https://stestr.readthedocs.io/en/latest/
|
||||||
|
@ -28,8 +28,7 @@ os-api-ref>=1.4.0 # Apache-2.0
|
|||||||
# test wsgi apps without starting an http server
|
# test wsgi apps without starting an http server
|
||||||
WebTest>=2.0.27 # MIT
|
WebTest>=2.0.27 # MIT
|
||||||
|
|
||||||
python-subunit>=0.0.18 # Apache-2.0/BSD
|
stestr>=1.0.0 # Apache-2.0
|
||||||
testrepository>=0.0.18 # Apache-2.0/BSD
|
|
||||||
testtools>=1.4.0 # MIT
|
testtools>=1.4.0 # MIT
|
||||||
|
|
||||||
# For documentation
|
# For documentation
|
||||||
|
8
tox.ini
8
tox.ini
@ -45,9 +45,15 @@ commands = bandit -r keystone -x tests
|
|||||||
[testenv:cover]
|
[testenv:cover]
|
||||||
# Also do not run test_coverage_ext tests while gathering coverage as those
|
# Also do not run test_coverage_ext tests while gathering coverage as those
|
||||||
# tests conflict with coverage.
|
# tests conflict with coverage.
|
||||||
|
setenv =
|
||||||
|
{[testenv]setenv}
|
||||||
|
PYTHON=coverage run --source keystone --parallel-mode
|
||||||
commands =
|
commands =
|
||||||
find keystone -type f -name "*.pyc" -delete
|
find keystone -type f -name "*.pyc" -delete
|
||||||
python setup.py testr --coverage --testr-args='{posargs}'
|
stestr run {posargs}
|
||||||
|
coverage combine
|
||||||
|
coverage html -d cover
|
||||||
|
coverage xml -o cover/coverage.xml
|
||||||
|
|
||||||
[testenv:patch_cover]
|
[testenv:patch_cover]
|
||||||
commands =
|
commands =
|
||||||
|
Loading…
Reference in New Issue
Block a user