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: Ie17b8fd07604e030e6ea6b9ded75e85794cb881a
This commit is contained in:
Vu Cong Tuan 2018-07-11 10:42:10 +07:00
parent d3e958d739
commit 650bbc5755
6 changed files with 26 additions and 44 deletions

2
.gitignore vendored
View File

@ -13,7 +13,7 @@ coverage.xml
*.py[co]
.DS_Store
*.log
.testrepository
.stestr/
subunit.log
.eggs
AUTHORS

4
.stestr.conf Normal file
View File

@ -0,0 +1,4 @@
[DEFAULT]
test_path=${OS_TEST_PATH:-./tests/unit}
top_dir=./

View File

@ -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:-./tests/unit} -t . $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list
group_regex=([^\.]+\.)+

View File

@ -2,10 +2,10 @@ pbr>=1.8 # Apache-2.0
python-keystoneclient>=3.8.0 # Apache-2.0
python-monascaclient>=1.1.0 # Apache-2.0
python-neutronclient>=5.1.0 # Apache-2.0
python-novaclient>=6.0.0,!=7.0.0 # Apache-2.0
python-novaclient>=6.0.0 # Apache-2.0
PyYAML>=3.10.0 # MIT
oslo.config>=3.14.0,!=3.18.0 # Apache-2.0
oslo.config>=3.14.0 # Apache-2.0
oslo.utils>=3.18.0 # Apache-2.0
oslo.log>=3.11.0 # Apache-2.0
libvirt-python>=1.2.5 # LGPLv2+
Jinja2>=2.8,!=2.9.0,!=2.9.1,!=2.9.2,!=2.9.3,!=2.9.4 # BSD License (3 clause)
Jinja2>=2.8 # BSD License (3 clause)

View File

@ -5,13 +5,12 @@ astroid===1.3.6
flake8>=2.5.4,<2.6.0 # MIT
hacking>=0.12.0,!=0.13.0,<0.14 # Apache-2.0
coverage>=3.6
discover # BSD
mock>=1.0,<1.1.0
mock>=1.0
pep8==1.5.7
mccabe==0.2.1 # MIT License
pylint==1.4.4 # GNU GPL v2
pyflakes==0.8.1
testrepository>=0.0.18
testtools>=0.9.36,!=1.2.0,<2.0.0
oslosphinx>=2.5.0,!=3.4.0 # Apache-2.0
sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3 # BSD
stestr>=2.0.0 # Apache-2.0
testtools>=0.9.36
oslosphinx>=2.5.0 # Apache-2.0
sphinx>=1.1.2 # BSD

38
tox.ini
View File

@ -17,7 +17,19 @@ passenv =
http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
install_command = pip install -U {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
setenv =
VIRTUAL_ENV={envdir}
OS_TEST_PATH = ./tests/unit
PYTHON=coverage run --source freezer_dr --parallel-mode
commands =
find . -type f -name "*.pyc" -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
@ -36,36 +48,12 @@ commands =
[testenv:py27]
basepython = python2.7
setenv =
OS_TEST_PATH = ./tests/unit
commands =
find . -type f -name "*.pyc" -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 = ./tests/unit
commands =
find . -type f -name "*.pyc" -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 = ./tests/unit
commands =
find . -type f -name "*.pyc" -delete
python setup.py testr --coverage --testr-args="{posargs}"
# coverage report -m
rm -f .coverage
rm -rf .testrepository
[testenv:pep8]
commands = flake8 freezer_dr