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.

This patch also moves "commands" and "setenv"
from [testenv:pyNN] sections to [testenv].

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

Change-Id: Ic9c99015516c31cbda2a626f8df4ff2f8dc3d852
changes/21/581221/3
Vu Cong Tuan 5 years ago
parent bceaa10435
commit 2c8cd7b651

4
.gitignore vendored

@ -15,7 +15,7 @@ coverage.xml
*.py[co]
.DS_Store
*.log
.testrepository
.stestr/
subunit.log
.eggs
AUTHORS
@ -29,4 +29,4 @@ ChangeLog
.coverage.*
releasenotes/build
.vscode/
.vscode/

@ -0,0 +1,4 @@
[DEFAULT]
test_path=./freezerclient/tests/unit
top_dir=./

@ -1,9 +0,0 @@
[DEFAULT]
test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_LOG_CAPTURE=${OS_LOG_CAPTURE:-1} \
${PYTHON:-python} -m subunit.run discover -s ${OS_TEST_PATH:-./freezerclient/tests/unit} -t . $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list
group_regex=([^\.]+\.)+

@ -40,12 +40,13 @@ pytz==2013.6
PyYAML==3.12
reno==2.5.0
requests==2.14.2
setuptools==21.0.0
six==1.10.0
snowballstemmer==1.2.1
Sphinx==1.6.5
sphinxcontrib-websupport==1.0.1
stevedore==1.20.0
testrepository==0.0.18
stestr==2.0.0
testtools==2.2.0
traceback2==1.4.0
unittest2==1.1.0

@ -6,5 +6,5 @@ hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0
mock>=2.0.0 # BSD
pylint==1.4.5 # GPLv2
testrepository>=0.0.18 # Apache-2.0/BSD
stestr>=2.0.0 # Apache-2.0
testtools>=2.2.0 # MIT

@ -10,7 +10,19 @@ deps =
-r{toxinidir}/test-requirements.txt
install_command = pip install {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
setenv =
VIRTUAL_ENV={envdir}
PYTHON=coverage run --source freezerclient --parallel-mode
OS_TEST_PATH = ./freezerclient/tests/unit
commands =
find . -type f -name "*.py[c|o]" -delete
stestr run '{posargs}'
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
coverage report -m
rm -f .coverage
rm -rf .testrepository
whitelist_externals =
find
@ -25,36 +37,12 @@ commands = {posargs}
[testenv:py27]
basepython = python2.7
setenv =
OS_TEST_PATH = ./freezerclient/tests/unit
commands =
find . -type f -name "*.py[c|o]" -delete
python setup.py testr --coverage --testr-args="{posargs}"
coverage report -m
rm -f .coverage
rm -rf .testrepository
[testenv:py35]
basepython = python3.5
setenv =
OS_TEST_PATH = ./freezerclient/tests/unit
commands =
find . -type f -name "*.py[c|o]" -delete
python setup.py testr --coverage --testr-args="{posargs}"
coverage report -m
rm -f .coverage
rm -rf .testrepository
[testenv:py36]
basepython = python3.6
setenv =
OS_TEST_PATH = ./freezerclient/tests/unit
commands =
find . -type f -name "*.py[c|o]" -delete
python setup.py testr --coverage --testr-args="{posargs}"
coverage report -m
rm -f .coverage
rm -rf .testrepository
[testenv:docs]
deps = -r{toxinidir}/doc/requirements.txt

Loading…
Cancel
Save