Merge "Switch to stestr"

This commit is contained in:
Zuul 2018-07-24 13:00:47 +00:00 committed by Gerrit Code Review
commit 783655f546
6 changed files with 16 additions and 11 deletions

2
.gitignore vendored
View File

@ -1,5 +1,5 @@
.coverage
.testrepository
.stestr/
subunit.log
.venv
*,cover

4
.stestr.conf Normal file
View File

@ -0,0 +1,4 @@
[DEFAULT]
test_path=${OS_TEST_PATH:-./keystoneclient/tests/unit}
top_dir=./

View File

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

View File

@ -64,10 +64,9 @@ requestsexceptions==1.2.0
rfc3986==0.3.1
six==1.10.0
smmap==0.9.0
stestr==1.0.0
stevedore==1.20.0
tempest==17.1.0
testrepository==0.0.18
stestr==2.0.0
testresources==2.0.0
testscenarios==0.4
testtools==2.2.0

View File

@ -14,7 +14,7 @@ oauthlib>=0.6.2 # BSD
oslotest>=3.2.0 # Apache-2.0
requests-mock>=1.2.0 # Apache-2.0
tempest>=17.1.0 # Apache-2.0
testrepository>=0.0.18 # Apache-2.0/BSD
stestr>=2.0.0 # Apache-2.0
testresources>=2.0.0 # Apache-2.0/BSD
testscenarios>=0.4 # Apache-2.0/BSD
testtools>=2.2.0 # MIT

12
tox.ini
View File

@ -15,7 +15,7 @@ deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = find . -type f -name "*.pyc" -delete
python setup.py testr --slowest --testr-args='{posargs}'
stestr run --slowest {posargs}
whitelist_externals = find
[testenv:pep8]
@ -36,8 +36,14 @@ commands = {posargs}
[testenv:cover]
basepython = python3
commands = python setup.py testr --coverage --testr-args='{posargs}'
coverage report
setenv =
PYTHON=coverage run --source keystoneclient --parallel-mode
commands =
stestr run '{posargs}'
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
coverage report
[testenv:debug]
basepython = python3