Use common tools to fire up tests

This patch uses os-testr in order to fire up tests
and allow to parametrize them in the way that is
common for the rest of OpenStack projects.

Change-Id: I6ef493f63675c63c8bad409cb15960582344c046
Partial-bug: #1469045
This commit is contained in:
Roman Prykhodchenko 2016-03-10 15:37:54 +01:00
parent 2df9cf0bfe
commit 68d4b32bba
2 changed files with 4 additions and 17 deletions

View File

@ -1,6 +1,7 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
os-testr>=0.4.1 # Apache-2.0
coverage>=3.6 # Apache-2.0
fixtures>=1.3.1 # Apache-2.0/BSD
hacking<0.11,>=0.10.2 # Apache-2.0
@ -8,7 +9,6 @@ mock>=1.2 # BSD
oslotest>=1.10.0 # Apache-2.0
requests-mock>=0.7.0 # Apache-2.0
testrepository>=0.0.18 # Apache-2.0/BSD
testtools>=1.4.0 # MIT
# Files beyond this line are not in Global Requirements list
# and must be added there.

19
tox.ini
View File

@ -5,9 +5,7 @@ envlist = py27,pep8,functional,cleanup
[testenv]
usedevelop = True
install_command = pip install --allow-external -U {opts} {packages}
whitelist_externals = bash
oslo_debug_helper
python
setenv = VIRTUAL_ENV={envdir}
ARTIFACTS={toxinidir}/{env:ARTIFACTS:test_run}
@ -31,7 +29,7 @@ setenv = VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = python setup.py test --slowest --testr-args "{posargs}"
commands = ostestr --serial {posargs}
[testenv:functional]
setenv = {[testenv]setenv}
@ -39,16 +37,7 @@ setenv = {[testenv]setenv}
commands =
bash {toxinidir}/tools/cleanup.sh
bash {toxinidir}/tools/prepare_nailgun.sh
python setup.py test --slowest --testr-args "{posargs}"
[testenv:dbgunit]
commands = oslo_debug_helper -t {toxinidir}/fuelclient/tests/unit {posargs}
[testenv:dbgfunc]
commands =
bash {toxinidir}/tools/cleanup.sh
bash {toxinidir}/tools/prepare_nailgun.sh
oslo_debug_helper -t {toxinidir}/fuelclient/tests/functional {posargs}
ostestr --serial {posargs}
[testenv:cleanup]
commands =
@ -56,14 +45,12 @@ commands =
bash -c "find {toxinidir} -name \"*.pyc\" -delete"
[testenv:pep8]
deps = hacking==0.10
usedevelop = False
commands =
flake8 {posargs:fuelclient}
[testenv:cover]
commands =
python setup.py testr --coverage --testr-args '{posargs}'
python setup.py test --coverage --testr-args '{posargs}'
[testenv:venv]
commands = {posargs:}