Use stestr for unit tests
Change-Id: Ifaf3991e1c9400683e9c98185b86cb39ac3d318d
This commit is contained in:
parent
ee8da54dbc
commit
93746a9b28
1
.gitignore
vendored
1
.gitignore
vendored
@ -9,6 +9,7 @@ tags
|
|||||||
heat-test.db
|
heat-test.db
|
||||||
heat.sqlite
|
heat.sqlite
|
||||||
.venv
|
.venv
|
||||||
|
.stestr/*
|
||||||
AUTHORS
|
AUTHORS
|
||||||
ChangeLog
|
ChangeLog
|
||||||
templates/cloudformation-examples
|
templates/cloudformation-examples
|
||||||
|
3
.stestr.conf
Normal file
3
.stestr.conf
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[DEFAULT]
|
||||||
|
test_path=${TEST_PATH:-./heat/tests}
|
||||||
|
top_dir=./
|
@ -1,8 +0,0 @@
|
|||||||
[DEFAULT]
|
|
||||||
test_command=
|
|
||||||
PYTHON=$(echo ${PYTHON:-python} | sed 's/--source heat//g')
|
|
||||||
START_AT=${TESTR_START_DIR:-.}
|
|
||||||
${PYTHON} -m subunit.run discover -s $START_AT -t . $LISTOPT $IDOPTION
|
|
||||||
if [ "$START_AT" = "." ]; then for plugin in $START_AT/contrib/*; do ${PYTHON} -m subunit.run discover -s $plugin $LISTOPT $IDOPTION; done; fi
|
|
||||||
test_id_option=--load-list $IDFILE
|
|
||||||
test_list_option=--list
|
|
6
tox.ini
6
tox.ini
@ -7,14 +7,14 @@ skipsdist = True
|
|||||||
setenv = VIRTUAL_ENV={envdir}
|
setenv = VIRTUAL_ENV={envdir}
|
||||||
PYTHONWARNINGS=default::DeprecationWarning
|
PYTHONWARNINGS=default::DeprecationWarning
|
||||||
OS_TEST_PATH=heat/tests
|
OS_TEST_PATH=heat/tests
|
||||||
TESTR_START_DIR=heat/tests
|
|
||||||
usedevelop = True
|
usedevelop = True
|
||||||
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
||||||
deps = -r{toxinidir}/requirements.txt
|
deps = -r{toxinidir}/requirements.txt
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
commands =
|
commands =
|
||||||
find {toxinidir} -not -path '{toxinidir}/.tox/*' -name '*.py[c|o]' -delete
|
find {toxinidir} -not -path '{toxinidir}/.tox/*' -name '*.py[c|o]' -delete
|
||||||
python setup.py testr --slowest --testr-args='{posargs}'
|
stestr run '{posargs}'
|
||||||
|
stestr slowest
|
||||||
|
|
||||||
whitelist_externals =
|
whitelist_externals =
|
||||||
bash
|
bash
|
||||||
@ -24,7 +24,7 @@ passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
|||||||
[testenv:py27log]
|
[testenv:py27log]
|
||||||
commands =
|
commands =
|
||||||
find . -type f -name "*.py[c|o]" -delete
|
find . -type f -name "*.py[c|o]" -delete
|
||||||
ostestr '^(?!heat_integrationtests){posargs}'
|
stestr run '^(?!heat_integrationtests){posargs}'
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
commands =
|
commands =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user