Migrate to stestr

This should both keep mtreinish happy and get rid of annoying 'db type
could not be determined' messages in one fell swoop.

Change-Id: I0db004a8c8d75359e7d08c73b82f98c62a7e5f7d
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This commit is contained in:
Stephen Finucane 2018-05-30 14:20:14 +01:00 committed by Doug Hellmann
parent d0cd199ce8
commit f6069e9e42
6 changed files with 16 additions and 14 deletions

3
.gitignore vendored
View File

@ -25,8 +25,7 @@ pip-log.txt
.coverage*
cover
.tox
nosetests.xml
.testrepository
.stestr
# Translations
*.mo

3
.stestr.conf Normal file
View File

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

View File

@ -59,6 +59,7 @@ smmap2==2.0.3
snowballstemmer==1.2.1
Sphinx==1.6.5
sphinxcontrib-websupport==1.0.1
stestr==2.0.0
stevedore==1.28.0
systemd-python==234
testrepository==0.0.20

View File

@ -4,7 +4,7 @@
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
testrepository>=0.0.20 # Apache-2.0/BSD
stestr>=2.0.0 # Apache-2.0
testtools>=2.3.0 # MIT
mock>=2.0.0 # BSD
oslotest>=3.3.0 # Apache-2.0

14
tox.ini
View File

@ -3,6 +3,8 @@ minversion = 2.0
envlist = py35,py27,pep8
[testenv]
whitelist_externals =
find
setenv =
VIRTUAL_ENV={envdir}
BRANCH_NAME=master
@ -11,8 +13,9 @@ install_command = {toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:h
deps = -r{toxinidir}/test-requirements.txt
-e.[fixtures]
commands =
python setup.py test --coverage --coverage-package-name=oslo_log --slowest --testr-args='{posargs}'
coverage report --show-missing
find . -type f -name "*.pyc" -delete
stestr run {posargs}
stestr slowest
[testenv:pep8]
basepython = python3
@ -36,7 +39,11 @@ commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasen
[testenv:cover]
basepython = python3
commands =
python setup.py test --coverage --coverage-package-name=oslo_log --testr-args='{posargs}'
coverage erase
{[testenv]commands}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
coverage report --show-missing
[testenv:bandit]
@ -52,7 +59,6 @@ deps =
[flake8]
# E123, E125 skipped as they are invalid PEP-8.
show-source = True
ignore = E123,E125,H405
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,__init__.py