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: Iee69eae0043a401eb355a1fcb957879904882e85
This commit is contained in:
parent
5dea5cec13
commit
1f8a317ace
3
.gitignore
vendored
3
.gitignore
vendored
@ -27,11 +27,10 @@ pip-log.txt
|
|||||||
|
|
||||||
# Unit test / coverage reports
|
# Unit test / coverage reports
|
||||||
cover
|
cover
|
||||||
.testrepository
|
.stestr/
|
||||||
.coverage
|
.coverage
|
||||||
.coverage.*
|
.coverage.*
|
||||||
.tox
|
.tox
|
||||||
nosetests.xml
|
|
||||||
coverage.xml
|
coverage.xml
|
||||||
flake8.log
|
flake8.log
|
||||||
|
|
||||||
|
4
.stestr.conf
Normal file
4
.stestr.conf
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
[DEFAULT]
|
||||||
|
test_path=${OS_TEST_PATH:-./barbican/tests/}
|
||||||
|
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:-./barbican/tests/} -t . $LISTOPT $IDOPTION
|
|
||||||
|
|
||||||
test_id_option=--load-list $IDFILE
|
|
||||||
test_list_option=--list
|
|
||||||
group_regex=([^\.]+\.)+
|
|
@ -94,7 +94,7 @@ install_barbican()
|
|||||||
pip install -e .
|
pip install -e .
|
||||||
|
|
||||||
# Run unit tests
|
# Run unit tests
|
||||||
python setup.py testr
|
stestr run
|
||||||
|
|
||||||
start_barbican
|
start_barbican
|
||||||
}
|
}
|
||||||
|
@ -5,4 +5,4 @@ reno>=2.5.0 # Apache-2.0
|
|||||||
os-api-ref>=1.4.0 # Apache-2.0
|
os-api-ref>=1.4.0 # Apache-2.0
|
||||||
openstackdocstheme>=1.18.1 # Apache-2.0
|
openstackdocstheme>=1.18.1 # Apache-2.0
|
||||||
castellan >= 0.17 # Apache-2.0
|
castellan >= 0.17 # Apache-2.0
|
||||||
pykmip==0.7.0 # Apache 2.0 License
|
pykmip>=0.7.0 # Apache 2.0 License
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -o pipefail
|
|
||||||
|
|
||||||
TESTRARGS=$1
|
|
||||||
python setup.py testr --coverage --testr-args="--subunit $TESTRARGS" | subunit-trace --no-failure-debug -f
|
|
||||||
retval=$?
|
|
||||||
echo -e "\nSlowest Tests:\n"
|
|
||||||
testr slowest
|
|
||||||
exit $retval
|
|
@ -60,7 +60,6 @@ netifaces==0.10.6
|
|||||||
openstackdocstheme==1.18.1
|
openstackdocstheme==1.18.1
|
||||||
os-api-ref==1.4.0
|
os-api-ref==1.4.0
|
||||||
os-client-config==1.29.0
|
os-client-config==1.29.0
|
||||||
os-testr==1.0.0
|
|
||||||
oslo.cache==1.29.0
|
oslo.cache==1.29.0
|
||||||
oslo.concurrency==3.26.0
|
oslo.concurrency==3.26.0
|
||||||
oslo.config==5.2.0
|
oslo.config==5.2.0
|
||||||
@ -123,7 +122,6 @@ stevedore==1.20.0
|
|||||||
tempest==17.1.0
|
tempest==17.1.0
|
||||||
Tempita==0.5.2
|
Tempita==0.5.2
|
||||||
tenacity==4.9.0
|
tenacity==4.9.0
|
||||||
testrepository==0.0.18
|
|
||||||
testresources==2.0.1
|
testresources==2.0.1
|
||||||
testscenarios==0.5.0
|
testscenarios==0.5.0
|
||||||
testtools==2.2.0
|
testtools==2.2.0
|
||||||
|
@ -9,9 +9,8 @@ coverage!=4.4,>=4.0 # Apache-2.0
|
|||||||
ddt>=1.0.1 # MIT
|
ddt>=1.0.1 # MIT
|
||||||
mock>=2.0.0 # BSD
|
mock>=2.0.0 # BSD
|
||||||
oslotest>=3.2.0 # Apache-2.0
|
oslotest>=3.2.0 # Apache-2.0
|
||||||
os-testr>=1.0.0 # Apache-2.0
|
pykmip>=0.7.0 # Apache 2.0 License
|
||||||
pykmip==0.7.0 # Apache 2.0 License
|
stestr>=2.0.0 # Apache-2.0
|
||||||
testrepository>=0.0.18 # Apache-2.0/BSD
|
|
||||||
testtools>=2.2.0 # MIT
|
testtools>=2.2.0 # MIT
|
||||||
fixtures>=3.0.0 # Apache-2.0/BSD
|
fixtures>=3.0.0 # Apache-2.0/BSD
|
||||||
requests>=2.14.2 # Apache-2.0
|
requests>=2.14.2 # Apache-2.0
|
||||||
|
39
tox.ini
39
tox.ini
@ -4,6 +4,8 @@ envlist = py35,py27,pep8,docs
|
|||||||
skipsdist = True
|
skipsdist = True
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
|
setenv =
|
||||||
|
PYTHON=coverage run --source barbican --parallel-mode
|
||||||
usedevelop = True
|
usedevelop = True
|
||||||
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} -U {opts} {packages}
|
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} -U {opts} {packages}
|
||||||
deps = -r{toxinidir}/requirements.txt
|
deps = -r{toxinidir}/requirements.txt
|
||||||
@ -14,7 +16,10 @@ commands =
|
|||||||
/usr/bin/find . -type f -name "*.py[c|o]" -delete
|
/usr/bin/find . -type f -name "*.py[c|o]" -delete
|
||||||
rm -f .testrepository/times.dbm
|
rm -f .testrepository/times.dbm
|
||||||
coverage erase
|
coverage erase
|
||||||
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 -m
|
coverage report -m
|
||||||
whitelist_externals = rm
|
whitelist_externals = rm
|
||||||
|
|
||||||
@ -25,9 +30,11 @@ deps =
|
|||||||
diff_cover
|
diff_cover
|
||||||
commands =
|
commands =
|
||||||
coverage erase
|
coverage erase
|
||||||
python setup.py testr --coverage --testr-args='{posargs}'
|
stestr run '{posargs}'
|
||||||
coverage xml
|
coverage combine
|
||||||
diff-cover --fail-under 100 --compare-branch master coverage.xml
|
coverage html -d cover
|
||||||
|
coverage xml -o cover/coverage.xml
|
||||||
|
diff-cover --fail-under 100 --compare-branch master cover/coverage.xml
|
||||||
|
|
||||||
[testenv:releasenotes]
|
[testenv:releasenotes]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
@ -97,19 +104,27 @@ commands =
|
|||||||
# This tox env is purely to make local test development easier
|
# This tox env is purely to make local test development easier
|
||||||
# Note: This requires local running instances of Barbican and Keystone
|
# Note: This requires local running instances of Barbican and Keystone
|
||||||
deps = -r{toxinidir}/test-requirements.txt
|
deps = -r{toxinidir}/test-requirements.txt
|
||||||
setenv = OS_TEST_PATH={toxinidir}/functionaltests
|
setenv =
|
||||||
|
OS_TEST_PATH={toxinidir}/functionaltests
|
||||||
commands =
|
commands =
|
||||||
/usr/bin/find . -type f -name "*.py[c|o]" -delete
|
/usr/bin/find . -type f -name "*.py[c|o]" -delete
|
||||||
/bin/bash {toxinidir}/functionaltests/pretty_tox.sh '{posargs}'
|
stestr run --slowest {posargs}
|
||||||
|
coverage combine
|
||||||
|
coverage html -d cover
|
||||||
|
coverage xml -o cover/coverage.xml
|
||||||
passenv = KMIP_PLUGIN_ENABLED
|
passenv = KMIP_PLUGIN_ENABLED
|
||||||
|
|
||||||
[testenv:py35functional]
|
[testenv:py35functional]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
deps = -r{toxinidir}/test-requirements.txt
|
deps = -r{toxinidir}/test-requirements.txt
|
||||||
setenv = OS_TEST_PATH={toxinidir}/functionaltests
|
setenv =
|
||||||
|
OS_TEST_PATH={toxinidir}/functionaltests
|
||||||
commands =
|
commands =
|
||||||
/usr/bin/find . -type f -name "*.py[c|o]" -delete
|
/usr/bin/find . -type f -name "*.py[c|o]" -delete
|
||||||
/bin/bash {toxinidir}/functionaltests/pretty_tox.sh '{posargs}'
|
stestr run --slowest {posargs}
|
||||||
|
coverage combine
|
||||||
|
coverage html -d cover
|
||||||
|
coverage xml -o cover/coverage.xml
|
||||||
passenv = KMIP_PLUGIN_ENABLED
|
passenv = KMIP_PLUGIN_ENABLED
|
||||||
|
|
||||||
[testenv:cmd]
|
[testenv:cmd]
|
||||||
@ -117,10 +132,14 @@ basepython = python3
|
|||||||
# This tox env is purely to make local test development easier
|
# This tox env is purely to make local test development easier
|
||||||
# Note: This requires local running instances of Barbican and Keystone
|
# Note: This requires local running instances of Barbican and Keystone
|
||||||
deps = -r{toxinidir}/test-requirements.txt
|
deps = -r{toxinidir}/test-requirements.txt
|
||||||
setenv = OS_TEST_PATH={toxinidir}/barbican/cmd/functionaltests
|
setenv =
|
||||||
|
OS_TEST_PATH={toxinidir}/barbican/cmd/functionaltests
|
||||||
commands =
|
commands =
|
||||||
/usr/bin/find . -type f -name "*.py[c|o]" -delete
|
/usr/bin/find . -type f -name "*.py[c|o]" -delete
|
||||||
/bin/bash {toxinidir}/functionaltests/pretty_tox.sh '{posargs}'
|
stestr run '{posargs}'
|
||||||
|
coverage combine
|
||||||
|
coverage html -d cover
|
||||||
|
coverage xml -o cover/coverage.xml
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
filename = *.py,app.wsgi
|
filename = *.py,app.wsgi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user