Switch to stestr

According to Openstack summit session [1],
stestr is maintained project to which all Openstack projects should migrate.
Let's switch to stestr as other projects have already moved to it.

[1] https://etherpad.openstack.org/p/YVR-python-pti

Change-Id: I829d57082b4fb981dfab6ed0f976bb30f28b7901
This commit is contained in:
Vu Cong Tuan 2018-07-03 09:39:49 +07:00
parent b240e6d753
commit 03dc05dec3
6 changed files with 16 additions and 14 deletions

3
.gitignore vendored
View File

@ -24,8 +24,7 @@ pip-log.txt
# Unit test / coverage reports
.coverage
.tox
nosetests.xml
.testrepository
.stestr/
# Translations
*.mo

3
.stestr.conf Normal file
View File

@ -0,0 +1,3 @@
[DEFAULT]
test_path=./oslo_cache/tests
top_path=./

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_cache $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list

View File

@ -59,8 +59,8 @@ requestsexceptions==1.4.0
rfc3986==1.1.0
six==1.10.0
smmap2==2.0.3
stestr==2.0.0
stevedore==1.28.0
testrepository==0.0.20
testtools==2.3.0
traceback2==1.4.0
unittest2==1.1.0

View File

@ -7,3 +7,4 @@ oslotest>=3.2.0 # Apache-2.0
pifpaf>=0.10.0 # Apache-2.0
# Bandit security code scanner
bandit>=1.1.0 # Apache-2.0
stestr>=2.0.0 # Apache-2.0

14
tox.ini
View File

@ -14,17 +14,17 @@ deps = .[dogpile]
-r{toxinidir}/test-requirements.txt
commands =
find . -type f -name "*.pyc" -delete
python setup.py testr --slowest --testr-args='{posargs}'
stestr run --slowest {posargs}
[testenv:py27-functional-etcd3gw]
commands =
find . -type f -name "*.pyc" -delete
{toxinidir}/tools/setup-etcd-env.sh pifpaf -e OSLO_CACHE_TEST run etcd -- python setup.py testr --slowest --testr-args='functional.*'
{toxinidir}/tools/setup-etcd-env.sh pifpaf -e OSLO_CACHE_TEST run etcd -- stestr run --slowest functional.*
[testenv:py35-functional-etcd3gw]
commands =
find . -type f -name "*.pyc" -delete
{toxinidir}/tools/setup-etcd-env.sh pifpaf -e OSLO_CACHE_TEST run etcd -- python setup.py testr --slowest --testr-args='functional.*'
{toxinidir}/tools/setup-etcd-env.sh pifpaf -e OSLO_CACHE_TEST run etcd -- stestr run --slowest functional.*
[testenv:pep8]
basepython = python3
@ -49,7 +49,13 @@ commands =
[testenv:cover]
basepython = python3
commands = python setup.py testr --coverage --testr-args='{posargs}'
setenv =
PYTHON=coverage run --source $project --parallel-mode
commands =
stestr run '{posargs}'
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
[flake8]
show-source = True