Merge "Switch to using stestr"

This commit is contained in:
Zuul 2018-07-18 20:21:39 +00:00 committed by Gerrit Code Review
commit a62d2fa934
6 changed files with 22 additions and 10 deletions

7
.coveragerc Normal file
View File

@ -0,0 +1,7 @@
[run]
branch = True
source = virtualbmc
omit = virtualbmc/tests/*
[report]
ignore_errors = True

1
.gitignore vendored
View File

@ -28,6 +28,7 @@ cover
.tox
nosetests.xml
.testrepository
.stestr
.venv
# Translations

3
.stestr.conf Normal file
View File

@ -0,0 +1,3 @@
[DEFAULT]
test_path=${TESTS_DIR:-./virtualbmc/tests/unit/}
top_dir=./

View File

@ -1,7 +0,0 @@
[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 -t ./ . $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list

View File

@ -13,7 +13,7 @@ oslotest>=3.2.0 # Apache-2.0
testrepository>=0.0.18 # Apache-2.0/BSD
testscenarios>=0.4 # Apache-2.0/BSD
testtools>=2.2.0 # MIT
os-testr>=1.0.0 # Apache-2.0
stestr>=1.0.0 # Apache-2.0
mock>=2.0.0 # BSD
# releasenotes

12
tox.ini
View File

@ -15,7 +15,9 @@ deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
commands = ostestr {posargs}
commands =
stestr run '{posargs}'
stestr slowest
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
[testenv:pep8]
@ -30,7 +32,13 @@ commands = {posargs}
[testenv:cover]
basepython = python3
commands = python setup.py test --coverage --testr-args='{posargs}'
setenv = {[testenv]setenv}
PYTHON=coverage run --source virtualbmc --parallel-mode
commands =
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
[testenv:docs]
basepython = python3