Use stestr as the test runner for unit tests
This patchset changes Armada to use stestr instead of pytest for running unit tests as it is the officially sanctioned test runner in OpenStack [0]. [0] https://openstack.nimeyo.com/119685/openstack-dev-recent-changes-in-testr-and-migrating-stestr Change-Id: I4f1320968990d9d9cc4d50cac0f2eecc3a0d331c
This commit is contained in:
parent
c39d21eec8
commit
354cc14c59
@ -12,6 +12,4 @@ testtools>=2.3.0 # MIT
|
||||
os-testr>=1.0.0 # Apache-2.0
|
||||
flake8>=3.3.0
|
||||
mock
|
||||
pytest==3.2.1
|
||||
pytest-mock
|
||||
responses>=0.8.1
|
||||
|
@ -1,15 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Script for passing regex filtering of unit tests to py.test conditionally.
|
||||
# Needed because tox currently doesn't support conditional logic like this.
|
||||
|
||||
posargs=$@
|
||||
if [ ${#posargs} -ge 1 ]; then
|
||||
py.test -vvv -s --ignore=hapi -k $1
|
||||
else
|
||||
py.test -vvv -s --ignore=hapi
|
||||
fi
|
||||
TEST_STATUS=$?
|
||||
set -e
|
||||
|
||||
exit $TEST_STATUS
|
9
tox.ini
9
tox.ini
@ -18,8 +18,13 @@ whitelist_externals =
|
||||
rm
|
||||
commands =
|
||||
find . -type f -name "*.pyc" -delete
|
||||
python -V
|
||||
{toxinidir}/tools/run-unit-tests.sh {posargs}
|
||||
rm -Rf .testrepository/times.dbm
|
||||
|
||||
[testenv:py35]
|
||||
commands =
|
||||
{[testenv]commands}
|
||||
stestr run {posargs}
|
||||
stestr slowest
|
||||
|
||||
[testenv:docs]
|
||||
deps = -r{toxinidir}/doc/requirements.txt
|
||||
|
Loading…
Reference in New Issue
Block a user