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: I1c4aaa0e0909f5272ab970950e3d21662dee2227
This commit is contained in:
Vu Cong Tuan 2018-07-24 15:21:16 +07:00
parent 5c157edc88
commit 3e728f945f
8 changed files with 22 additions and 17 deletions

3
.gitignore vendored
View File

@ -25,8 +25,7 @@ pip-log.txt
.tox
cover
cover-master
nosetests.xml
.testrepository
.stestr/
.venv
# Translations

3
.stestr.conf Normal file
View File

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

View File

@ -103,7 +103,7 @@ sphinxcontrib-websupport==1.0.1
statsd==3.2.1
stevedore==1.20.0
tenacity==3.2.1
testrepository==0.0.18
stestr==2.0.0
testscenarios==0.4
testtools==2.2.0
traceback2==1.4.0

View File

@ -5,7 +5,7 @@ pbr!=2.1.0,>=2.0.0 # Apache-2.0
Babel!=2.4.0,>=2.3.4 # BSD
six>=1.10.0 # MIT
keystoneauth1>=3.3.0 # Apache-2.0
keystoneauth1>=3.4.0 # Apache-2.0
stevedore>=1.20.0 # Apache-2.0
requests>=2.14.2 # Apache-2.0
oslo.i18n>=3.15.3 # Apache-2.0
@ -14,6 +14,6 @@ oslo.serialization!=2.19.1,>=2.18.0 # Apache-2.0
oslo.utils>=3.33.0 # Apache-2.0
os-client-config>=1.28.0 # Apache-2.0
osc-lib>=1.8.0 # Apache-2.0
PrettyTable<0.8,>=0.7.1 # BSD
cryptography!=2.0,>=1.9 # BSD/Apache-2.0
PrettyTable<0.8,>=0.7.2 # BSD
cryptography>=2.1 # BSD/Apache-2.0
decorator>=3.4.0 # BSD

View File

@ -8,7 +8,7 @@ fixtures>=3.0.0 # Apache-2.0/BSD
python-openstackclient>=3.12.0 # Apache-2.0
oslotest>=3.2.0 # Apache-2.0
osprofiler>=1.4.0 # Apache-2.0
testrepository>=0.0.18 # Apache-2.0/BSD
stestr>=2.0.0 # Apache-2.0
testscenarios>=0.4 # Apache-2.0/BSD
testtools>=2.2.0 # MIT
mock>=2.0.0 # BSD

View File

@ -30,7 +30,12 @@ fi
git checkout HEAD^
baseline_report=$(mktemp -t magnumclient_coverageXXXXXXX)
find . -type f -name "*.pyc" -delete && python setup.py testr --coverage --testr-args="$*"
find . -type f -name "*.pyc" -delete
stestr run "$*"
coverage combine
coverage report --fail-under=80 --skip-covered
coverage html -d cover
coverage xml -o cover/coverage.xml
coverage report > $baseline_report
mv cover cover-master
cat $baseline_report
@ -40,7 +45,12 @@ baseline_missing=$(awk 'END { print $3 }' $baseline_report)
git checkout -
current_report=$(mktemp -t magnumclient_coverageXXXXXXX)
find . -type f -name "*.pyc" -delete && python setup.py testr --coverage --testr-args="$*"
find . -type f -name "*.pyc" -delete
stestr run "$*"
coverage combine
coverage report --fail-under=80 --skip-covered
coverage html -d cover
coverage xml -o cover/coverage.xml
coverage report > $current_report
current_missing=$(awk 'END { print $3 }' $current_report)

View File

@ -16,7 +16,7 @@ deps =
-r{toxinidir}/test-requirements.txt
commands =
find . -type f -name "*.py[c|o]" -delete
python setup.py testr --slowest --testr-args='{posargs}'
stestr run --slowest {posargs}
[testenv:bandit]
basepython = python3