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: I63079f352ff36dda4f3f64a8681431a319791f0e
This commit is contained in:
Vu Cong Tuan 2018-07-10 17:44:27 +07:00
parent 53b2cdca2c
commit 47d88430ce
7 changed files with 15 additions and 12 deletions

2
.gitignore vendored
View File

@ -24,7 +24,7 @@ __pycache__/
*$py.class *$py.class
# the files generated from tox command. # the files generated from tox command.
.testrepository/ .stestr/
AUTHORS AUTHORS
ChangeLog ChangeLog
doc/build 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 Sphinx==1.6.2
sphinxcontrib-websupport==1.0.1 sphinxcontrib-websupport==1.0.1
stevedore==1.28.0 stevedore==1.28.0
testrepository==0.0.18 stestr==2.0.0
testscenarios==0.4 testscenarios==0.4
testtools==2.2.0 testtools==2.2.0
traceback2==1.4.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 PyYAML>=3.12 # MIT
netaddr>=0.7.18 # BSD netaddr>=0.7.18 # BSD
cryptography>=2.1 # BSD/Apache-2.0 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-neutronclient>=6.7.0 # Apache-2.0
python-openstackclient>=3.12.0 # Apache-2.0 python-openstackclient>=3.12.0 # Apache-2.0
pytz>=2013.6 # MIT 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 testscenarios>=0.4 # Apache-2.0/BSD
testtools>=2.2.0 # MIT 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 = commands =
find . -type f -name "*.py[c|o]" -delete find . -type f -name "*.py[c|o]" -delete
find . -type d -name "__pycache__" -delete find . -type d -name "__pycache__" -delete
python setup.py test --slowest --testr-args='{posargs}' stestr run --slowest {posargs}
[testenv:debug] [testenv:debug]
commands = oslo_debug_helper -t tests {posargs} commands = oslo_debug_helper -t tests {posargs}
@ -28,7 +28,12 @@ setenv = VIRTUAL_ENV={envdir}
NOSE_COVER_BRANCHES=1 NOSE_COVER_BRANCHES=1
NOSE_COVER_HTML=1 NOSE_COVER_HTML=1
NOSE_COVER_HTML_DIR={toxinidir}/cover 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] [testenv:pep8]
# sphinx needs to be installed to make doc8 work properly # sphinx needs to be installed to make doc8 work properly