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: I55060b1d99b9a00b20c98fbb429d072568265695
This commit is contained in:
parent
2e6ef0c45a
commit
32a3244bb4
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,6 +1,6 @@
|
|||||||
.coverage
|
.coverage
|
||||||
.venv
|
.venv
|
||||||
.testrepository
|
.stestr/
|
||||||
subunit.log
|
subunit.log
|
||||||
.tox
|
.tox
|
||||||
*,cover
|
*,cover
|
||||||
|
3
.stestr.conf
Normal file
3
.stestr.conf
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[DEFAULT]
|
||||||
|
test_path=${OS_TEST_PATH:-./novaclient/tests/unit}
|
||||||
|
top_dir=./
|
@ -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:-300} \
|
|
||||||
${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./novaclient/tests/unit} $LISTOPT $IDOPTION
|
|
||||||
test_id_option=--load-list $IDFILE
|
|
||||||
test_list_option=--list
|
|
@ -48,7 +48,6 @@ netifaces==0.10.4
|
|||||||
openstacksdk==0.11.2
|
openstacksdk==0.11.2
|
||||||
os-client-config==1.28.0
|
os-client-config==1.28.0
|
||||||
os-service-types==1.2.0
|
os-service-types==1.2.0
|
||||||
os-testr==1.0.0
|
|
||||||
osc-lib==1.8.0
|
osc-lib==1.8.0
|
||||||
oslo.concurrency==3.25.0
|
oslo.concurrency==3.25.0
|
||||||
oslo.config==5.2.0
|
oslo.config==5.2.0
|
||||||
@ -96,11 +95,10 @@ simplejson==3.5.1
|
|||||||
six==1.10.0
|
six==1.10.0
|
||||||
smmap==0.9.0
|
smmap==0.9.0
|
||||||
statsd==3.2.1
|
statsd==3.2.1
|
||||||
stestr==1.0.0
|
|
||||||
stevedore==1.20.0
|
stevedore==1.20.0
|
||||||
tempest==17.1.0
|
tempest==17.1.0
|
||||||
tenacity==3.2.1
|
tenacity==3.2.1
|
||||||
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
|
||||||
|
@ -15,9 +15,8 @@ python-glanceclient>=2.8.0 # Apache-2.0
|
|||||||
python-neutronclient>=6.7.0 # Apache-2.0
|
python-neutronclient>=6.7.0 # Apache-2.0
|
||||||
requests-mock>=1.2.0 # Apache-2.0
|
requests-mock>=1.2.0 # Apache-2.0
|
||||||
os-client-config>=1.28.0 # Apache-2.0
|
os-client-config>=1.28.0 # Apache-2.0
|
||||||
os-testr>=1.0.0 # Apache-2.0
|
|
||||||
osprofiler>=1.4.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
|
testscenarios>=0.4 # Apache-2.0/BSD
|
||||||
testtools>=2.2.0 # MIT
|
testtools>=2.2.0 # MIT
|
||||||
tempest>=17.1.0 # Apache-2.0
|
tempest>=17.1.0 # Apache-2.0
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -o pipefail
|
|
||||||
|
|
||||||
TESTRARGS=$1
|
|
||||||
|
|
||||||
# --until-failure is not compatible with --subunit see:
|
|
||||||
#
|
|
||||||
# https://bugs.launchpad.net/testrepository/+bug/1411804
|
|
||||||
#
|
|
||||||
# this work around exists until that is addressed
|
|
||||||
if [[ "$TESTARGS" =~ "until-failure" ]]; then
|
|
||||||
python setup.py testr --slowest --testr-args="$TESTRARGS"
|
|
||||||
else
|
|
||||||
python setup.py testr --slowest --testr-args="--subunit $TESTRARGS" | subunit-trace -f
|
|
||||||
fi
|
|
20
tox.ini
20
tox.ini
@ -9,7 +9,6 @@ usedevelop = True
|
|||||||
# tox is silly... these need to be separated by a newline....
|
# tox is silly... these need to be separated by a newline....
|
||||||
whitelist_externals =
|
whitelist_externals =
|
||||||
find
|
find
|
||||||
bash
|
|
||||||
rm
|
rm
|
||||||
passenv = ZUUL_CACHE_DIR
|
passenv = ZUUL_CACHE_DIR
|
||||||
REQUIREMENTS_PIP_LOCATION
|
REQUIREMENTS_PIP_LOCATION
|
||||||
@ -20,9 +19,7 @@ deps =
|
|||||||
-r{toxinidir}/requirements.txt
|
-r{toxinidir}/requirements.txt
|
||||||
commands =
|
commands =
|
||||||
find . -type f -name "*.pyc" -delete
|
find . -type f -name "*.pyc" -delete
|
||||||
bash tools/pretty_tox.sh '{posargs}'
|
stestr run {posargs}
|
||||||
# there is also secret magic in pretty_tox.sh which lets you run in a fail only
|
|
||||||
# mode. To do this define the TRACE_FAILONLY environmental variable.
|
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
@ -63,25 +60,26 @@ commands =
|
|||||||
[testenv:functional]
|
[testenv:functional]
|
||||||
basepython = python2.7
|
basepython = python2.7
|
||||||
passenv = OS_NOVACLIENT_TEST_NETWORK
|
passenv = OS_NOVACLIENT_TEST_NETWORK
|
||||||
setenv =
|
|
||||||
OS_TEST_PATH = ./novaclient/tests/functional
|
|
||||||
commands =
|
commands =
|
||||||
bash tools/pretty_tox.sh '--concurrency=1 {posargs}'
|
stestr --test-path=./novaclient/tests/functional run --concurrency=1 {posargs}
|
||||||
python novaclient/tests/functional/hooks/check_resources.py
|
python novaclient/tests/functional/hooks/check_resources.py
|
||||||
|
|
||||||
[testenv:functional-py35]
|
[testenv:functional-py35]
|
||||||
basepython = python3.5
|
basepython = python3.5
|
||||||
passenv = OS_NOVACLIENT_TEST_NETWORK
|
passenv = OS_NOVACLIENT_TEST_NETWORK
|
||||||
setenv =
|
|
||||||
OS_TEST_PATH = ./novaclient/tests/functional
|
|
||||||
commands =
|
commands =
|
||||||
bash tools/pretty_tox.sh '--concurrency=1 {posargs}'
|
stestr --test-path=./novaclient/tests/functional run --concurrency=1 {posargs}
|
||||||
python novaclient/tests/functional/hooks/check_resources.py
|
python novaclient/tests/functional/hooks/check_resources.py
|
||||||
|
|
||||||
[testenv:cover]
|
[testenv:cover]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
|
setenv =
|
||||||
|
PYTHON=coverage run --source novaclient --parallel-mode
|
||||||
commands =
|
commands =
|
||||||
python setup.py testr --coverage --testr-args='{posargs}'
|
stestr run {posargs}
|
||||||
|
coverage combine
|
||||||
|
coverage html -d cover
|
||||||
|
coverage xml -o cover/coverage.xml
|
||||||
coverage report
|
coverage report
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
|
Loading…
Reference in New Issue
Block a user