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: I3760aae7bb78fdffc34a492f150bc7df8a4a9bf2
This commit is contained in:
parent
cbf37f5b85
commit
c1f4ad6184
|
@ -2,7 +2,7 @@
|
|||
*.mo
|
||||
*.pyc
|
||||
.coverage
|
||||
.testrepository
|
||||
.stestr/
|
||||
.tox
|
||||
AUTHORS
|
||||
build/*
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
[DEFAULT]
|
||||
test_path=${OS_TEST_PATH:-./panko/tests}
|
||||
top_dir=./
|
||||
group_regex=(gabbi\.(suitemaker|driver)\.test_gabbi_(?:prefix_|)[^_]+)_
|
|
@ -1,9 +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:-600} \
|
||||
${PYTHON:-python} -m subunit.run discover ${OS_TEST_PATH:-./panko/tests} -t . $LISTOPT $IDOPTION
|
||||
test_id_option=--load-list $IDFILE
|
||||
test_list_option=--list
|
||||
# NOTE(chdent): Only used/matches on gabbi-related tests.
|
||||
group_regex=(gabbi\.(suitemaker|driver)\.test_gabbi_(?:prefix_|)[^_]+)_
|
|
@ -17,7 +17,7 @@ sphinx>=1.6.2 # BSD
|
|||
openstackdocstheme>=1.11.0 # Apache-2.0
|
||||
sphinxcontrib-httpdomain # BSD
|
||||
sphinxcontrib-pecanwsme>=0.8 # Apache-2.0
|
||||
testrepository>=0.0.18 # Apache-2.0/BSD
|
||||
stestr>=2.0.0 # Apache-2.0
|
||||
testtools>=1.4.0 # MIT
|
||||
gabbi>=1.11.0 # Apache-2.0
|
||||
os-testr>=0.4.1 # 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
|
31
tox.ini
31
tox.ini
|
@ -13,45 +13,45 @@ setenv = VIRTUAL_ENV={envdir}
|
|||
# NOTE(tonyb): This project has chosen to *NOT* consume upper-constraints.txt
|
||||
passenv = OS_TEST_TIMEOUT OS_STDOUT_CAPTURE OS_STDERR_CAPTURE OS_LOG_CAPTURE
|
||||
commands =
|
||||
{toxinidir}/tools/pretty_tox.sh "{posargs}"
|
||||
stestr run {posargs}
|
||||
oslo-config-generator --config-file=etc/panko/panko-config-generator.conf
|
||||
whitelist_externals = bash
|
||||
|
||||
[testenv:py27-mongodb]
|
||||
setenv = OS_TEST_PATH=panko/tests/functional/
|
||||
commands = pifpaf run mongodb {toxinidir}/tools/pretty_tox.sh "{posargs}"
|
||||
commands = pifpaf run mongodb stestr run {posargs}
|
||||
|
||||
[testenv:py35-mongodb]
|
||||
basepython = python3.5
|
||||
setenv = OS_TEST_PATH=panko/tests/functional/
|
||||
commands = pifpaf run mongodb {toxinidir}/tools/pretty_tox.sh "{posargs}"
|
||||
commands = pifpaf run mongodb stestr run {posargs}
|
||||
|
||||
[testenv:py27-mysql]
|
||||
setenv = OS_TEST_PATH=panko/tests/functional/
|
||||
commands = pifpaf run mysql {toxinidir}/tools/pretty_tox.sh "{posargs}"
|
||||
commands = pifpaf run mysql stestr run {posargs}
|
||||
|
||||
[testenv:py35-mysql]
|
||||
basepython = python3.5
|
||||
setenv = OS_TEST_PATH=panko/tests/functional/
|
||||
commands = pifpaf run mysql {toxinidir}/tools/pretty_tox.sh "{posargs}"
|
||||
commands = pifpaf run mysql stestr run {posargs}
|
||||
|
||||
[testenv:py27-postgresql]
|
||||
setenv = OS_TEST_PATH=panko/tests/functional/
|
||||
commands = pifpaf run postgresql {toxinidir}/tools/pretty_tox.sh "{posargs}"
|
||||
commands = pifpaf run postgresql stestr run {posargs}
|
||||
|
||||
[testenv:py35-postgresql]
|
||||
basepython = python3.5
|
||||
setenv = OS_TEST_PATH=panko/tests/functional/
|
||||
commands = pifpaf run postgresql {toxinidir}/tools/pretty_tox.sh "{posargs}"
|
||||
commands = pifpaf run postgresql stestr run {posargs}
|
||||
|
||||
[testenv:py27-elastic]
|
||||
setenv = OS_TEST_PATH=panko/tests/functional/
|
||||
commands = pifpaf run elasticsearch {toxinidir}/tools/pretty_tox.sh "{posargs}"
|
||||
commands = pifpaf run elasticsearch stestr run {posargs}
|
||||
|
||||
[testenv:py35-elastic]
|
||||
basepython = python3
|
||||
setenv = OS_TEST_PATH=panko/tests/functional/
|
||||
commands = pifpaf run elasticsearch {toxinidir}/tools/pretty_tox.sh "{posargs}"
|
||||
commands = pifpaf run elasticsearch stestr run {posargs}
|
||||
|
||||
# NOTE(chdent): The gabbi tests are also run under the other functional
|
||||
# tox targets. This target simply provides a target to directly run just
|
||||
|
@ -61,14 +61,19 @@ commands = pifpaf run elasticsearch {toxinidir}/tools/pretty_tox.sh "{posargs}"
|
|||
basepython = python3
|
||||
setenv = OS_TEST_PATH=panko/tests/functional/gabbi
|
||||
passenv = PANKO_*
|
||||
commands = pifpaf run mongodb {toxinidir}/tools/pretty_tox.sh "{posargs}"
|
||||
commands = pifpaf run mongodb stestr run {posargs}
|
||||
|
||||
[testenv:cover]
|
||||
basepython = python3
|
||||
setenv = OS_TEST_PATH=panko/tests
|
||||
setenv =
|
||||
{[testenv]setenv}
|
||||
PYTHON=coverage run --source panko --parallel-mode
|
||||
commands =
|
||||
python setup.py testr --slowest --coverage --testr-args="{posargs}"
|
||||
coverage report
|
||||
stestr run '{posargs}'
|
||||
coverage combine
|
||||
coverage html -d cover
|
||||
coverage xml -o cover/coverage.xml
|
||||
coverage report
|
||||
|
||||
[testenv:pep8]
|
||||
basepython = python3
|
||||
|
|
Loading…
Reference in New Issue