Merge "Switch to stestr"

This commit is contained in:
Zuul 2018-09-24 11:07:48 +00:00 committed by Gerrit Code Review
commit 3c1616ffbc
7 changed files with 15 additions and 12 deletions

2
.gitignore vendored
View File

@ -24,7 +24,7 @@ __pycache__/
*$py.class
# the files generated from tox command.
.testrepository/
.stestr/
AUTHORS
ChangeLog
doc/build

4
.stestr.conf Normal file
View File

@ -0,0 +1,4 @@
[DEFAULT]
test_path=./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:-7200} \
${PYTHON:-python} -m subunit.run discover ${OS_TEST_PATH:-.} $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list

View File

@ -93,7 +93,7 @@ snowballstemmer==1.2.1
Sphinx==1.6.2
sphinxcontrib-websupport==1.0.1
stevedore==1.28.0
testrepository==0.0.18
stestr==2.0.0
testscenarios==0.4
testtools==2.2.0
traceback2==1.4.0

View File

@ -11,3 +11,4 @@ setuptools!=24.0.0,!=34.0.0,!=34.0.1,!=34.0.2,!=34.0.3,!=34.1.0,!=34.1.1,!=34.2.
PyYAML>=3.12 # MIT
netaddr>=0.7.18 # BSD
cryptography>=2.1 # BSD/Apache-2.0
stestr>=2.0.0 # Apache-2.0

View File

@ -16,6 +16,6 @@ python-ceilometerclient>=2.5.0 # Apache-2.0
python-neutronclient>=6.7.0 # Apache-2.0
python-openstackclient>=3.12.0 # Apache-2.0
pytz>=2013.6 # MIT
testrepository>=0.0.18 # Apache-2.0/BSD
stestr>=2.0.0 # Apache-2.0
testscenarios>=0.4 # Apache-2.0/BSD
testtools>=2.2.0 # MIT

View File

@ -17,7 +17,7 @@ passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
commands =
find . -type f -name "*.py[c|o]" -delete
find . -type d -name "__pycache__" -delete
python setup.py test --slowest --testr-args='{posargs}'
stestr run --slowest {posargs}
[testenv:debug]
basepython = python3
@ -30,7 +30,12 @@ setenv = VIRTUAL_ENV={envdir}
NOSE_COVER_BRANCHES=1
NOSE_COVER_HTML=1
NOSE_COVER_HTML_DIR={toxinidir}/cover
commands = python setup.py testr --coverage --testr-args='{posargs}'
PYTHON=coverage run --source kolla_ansible --parallel-mode
commands =
stestr run '{posargs}'
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
[testenv:pep8]
basepython = python3