Merge "Use stestr for unit tests"

This commit is contained in:
Zuul 2018-01-10 15:35:54 +00:00 committed by Gerrit Code Review
commit f95c75a3d8
4 changed files with 7 additions and 11 deletions

1
.gitignore vendored
View File

@ -9,6 +9,7 @@ tags
heat-test.db
heat.sqlite
.venv
.stestr/*
AUTHORS
ChangeLog
templates/cloudformation-examples

3
.stestr.conf Normal file
View File

@ -0,0 +1,3 @@
[DEFAULT]
test_path=${TEST_PATH:-./heat/tests}
top_dir=./

View File

@ -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

View File

@ -7,14 +7,14 @@ skipsdist = True
setenv = VIRTUAL_ENV={envdir}
PYTHONWARNINGS=default::DeprecationWarning
OS_TEST_PATH=heat/tests
TESTR_START_DIR=heat/tests
usedevelop = True
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
-r{toxinidir}/test-requirements.txt
commands =
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 =
bash
@ -24,7 +24,7 @@ passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
[testenv:py27log]
commands =
find . -type f -name "*.py[c|o]" -delete
ostestr '^(?!heat_integrationtests){posargs}'
stestr run '^(?!heat_integrationtests){posargs}'
[testenv:pep8]
commands =