Merge "Switch to stestr"

This commit is contained in:
Zuul 2019-01-09 17:08:59 +00:00 committed by Gerrit Code Review
commit 866171507a
6 changed files with 19 additions and 13 deletions

1
.gitignore vendored
View File

@ -40,6 +40,7 @@ install-undercloud.log
.tox
nosetests.xml
.testrepository
.stestr/*
# Translations
*.mo

3
.stestr.conf Normal file
View File

@ -0,0 +1,3 @@
[DEFAULT]
test_path=${TEST_PATH:-./tripleoclient/tests}
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

@ -138,10 +138,10 @@ sqlalchemy-migrate==0.11.0
SQLAlchemy==1.0.10
sqlparse==0.2.2
statsd==3.2.1
stestr==2.0.0
stevedore==1.20.0
Tempita==0.5.2
tenacity==4.9.0
testrepository==0.0.18
testscenarios===0.4
testtools==2.2.0
tooz==1.58.0

View File

@ -7,7 +7,7 @@ coverage!=4.4,>=4.0 # Apache-2.0
docutils>=0.11 # OSI-Approved Open Source, Public Domain
fixtures>=3.0.0 # Apache-2.0/BSD
mock>=2.0.0 # BSD
testrepository>=0.0.18 # Apache-2.0/BSD
stestr>=2.0.0 # Apache-2.0
testtools>=2.2.0 # MIT
requests-mock>=1.2.0 # Apache-2.0
testscenarios>=0.4 # Apache-2.0/BSD

17
tox.ini
View File

@ -6,16 +6,19 @@ skipsdist = True
[testenv]
usedevelop = True
install_command = pip install {opts} {packages}
passenv =
TERM
setenv =
VIRTUAL_ENV={envdir}
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_ALL=C
HOME={envdir}
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = python setup.py testr --slowest --testr-args='{posargs}'
commands = stestr run {posargs}
[testenv:bindep]
basepython = python3
@ -37,10 +40,16 @@ passenv = *
[testenv:cover]
basepython = python3
setenv =
PYTHON=coverage run --source tripleoclient --parallel-mode
HOME={envdir}
commands =
python setup.py testr --coverage --testr-args='{posargs}'
coverage combine
coverage report -m
coverage erase
stestr run --color {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
coverage report
[testenv:debug]
basepython = python3