Merge "Switch to use stestr for unit test"
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -26,7 +26,7 @@ pip-log.txt
|
|||||||
.coverage
|
.coverage
|
||||||
.tox
|
.tox
|
||||||
nosetests.xml
|
nosetests.xml
|
||||||
.testrepository
|
.stestr/
|
||||||
.venv
|
.venv
|
||||||
|
|
||||||
# Translations
|
# Translations
|
||||||
|
3
.stestr.conf
Normal file
3
.stestr.conf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
[DEFAULT]
|
||||||
|
test_path=./aodhclient/tests
|
||||||
|
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:-60} \
|
|
||||||
${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./aodhclient/tests} $LISTOPT $IDOPTION
|
|
||||||
test_id_option=--load-list $IDFILE
|
|
||||||
test_list_option=--list
|
|
@@ -29,7 +29,7 @@ test =
|
|||||||
oslotest>=1.10.0 # Apache-2.0
|
oslotest>=1.10.0 # Apache-2.0
|
||||||
reno>=1.6.2 # Apache2
|
reno>=1.6.2 # Apache2
|
||||||
tempest>=10
|
tempest>=10
|
||||||
testrepository>=0.0.18
|
stestr>=2.0.0 # Apache-2.0
|
||||||
testtools>=1.4.0
|
testtools>=1.4.0
|
||||||
pifpaf[gnocchi]>=0.23
|
pifpaf[gnocchi]>=0.23
|
||||||
gnocchi[postgresql,file]
|
gnocchi[postgresql,file]
|
||||||
|
10
tox.ini
10
tox.ini
@@ -16,7 +16,7 @@ passenv = GNOCCHI_* AODH_* OS_TEST_TIMEOUT OS_STDOUT_CAPTURE OS_STDERR_CAPTURE O
|
|||||||
deps =
|
deps =
|
||||||
.[test]
|
.[test]
|
||||||
http://tarballs.openstack.org/aodh/aodh-master.tar.gz#egg=aodh[mysql]
|
http://tarballs.openstack.org/aodh/aodh-master.tar.gz#egg=aodh[mysql]
|
||||||
commands = pifpaf run aodh -- python setup.py test --slowest --testr-args='{posargs}'
|
commands = pifpaf run aodh -- stestr run --slowest {posargs}
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
@@ -31,8 +31,14 @@ commands = {posargs}
|
|||||||
|
|
||||||
[testenv:cover]
|
[testenv:cover]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
|
setenv =
|
||||||
|
{[testenv]setenv}
|
||||||
|
PYTHON=coverage run --source aodhclient --parallel-mode
|
||||||
commands =
|
commands =
|
||||||
python setup.py test --coverage --testr-args='{posargs}'
|
stestr run {posargs}
|
||||||
|
coverage combine
|
||||||
|
coverage html -d cover
|
||||||
|
coverage xml -o cover/coverage.xml
|
||||||
coverage report
|
coverage report
|
||||||
|
|
||||||
[testenv:releasenotes]
|
[testenv:releasenotes]
|
||||||
|
Reference in New Issue
Block a user