Switch to use stestr instead of ostestr

This commit switches to use stestr[1] instead of ostestr. We don't need
to use ostestr layer because we can use stestr directory.

[1] https://github.com/mtreinish/stestr

Change-Id: I566dca2f3052520a09558bf315b433984c221034
This commit is contained in:
Masayuki Igawa 2017-09-11 13:58:53 -06:00 committed by Masayuki Igawa
parent f7143734f8
commit 14bfbbfc09
No known key found for this signature in database
GPG Key ID: 290F53EDC899BF89
4 changed files with 13 additions and 4 deletions

2
.gitignore vendored
View File

@ -35,7 +35,7 @@ pip-log.txt
!.coveragerc
.tox
nosetests.xml
.testrepository
.stestr
.venv
# Translations

2
.stestr.conf Normal file
View File

@ -0,0 +1,2 @@
[DEFAULT]
test_path=./openstack_health/tests

View File

@ -5,7 +5,7 @@ hacking<0.11,>=0.10.0
coverage!=4.4,>=4.0 # Apache-2.0
docutils>=0.11 # OSI-Approved Open Source, Public Domain
os-testr>=0.8.0 # Apache-2.0
stestr>=1.0.0 # Apache-2.0
mock>=2.0 # BSD
fixtures>=3.0.0 # Apache-2.0/BSD
sphinx>=1.6.2 # BSD

11
tox.ini
View File

@ -12,7 +12,7 @@ deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
find . -type f -name "*.pyc" -delete
ostestr {posargs}
stestr run {posargs}
[testenv:venv]
commands = {posargs}
@ -26,7 +26,14 @@ commands =
flake8 {toxinidir}/openstack_health {posargs}
[testenv:cover]
commands = python setup.py test --coverage --coverage-package-name='openstack_health' --testr-args={posargs}
setenv =
{[testenv]setenv}
PYTHON = coverage run --source openstack_health --parallel-mode
commands =
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
[flake8]
# E125 is a won't fix until https://github.com/jcrocholl/pep8/issues/126 is resolved. For further detail see https://review.openstack.org/#/c/36788/