Reduce stestr concurrency to 1 for tempest jobs

The switch from ostestr to stestr introduced in Change-Id
Ie6a275170ec6faf0db3976410660f52078710a54 missed setting concurrency
jobs to 1 for api and scenario tests, leading to intermittent gate
issues.

This patch also fixes coverage test that got broken in the
aforementioned Change-Id.

Depends-On: https://review.openstack.org/#/c/542223/
Change-Id: I077330ad6f0308845d1b5330040be6f92c39580d
(cherry picked from commit d871c2a7fb)
This commit is contained in:
Carlos Goncalves 2018-03-11 18:49:09 +01:00 committed by Adam Harwell
parent db9e03ca40
commit fcd8dea980
2 changed files with 12 additions and 10 deletions

View File

@ -1,5 +0,0 @@
[DEFAULT]
#test_command=${PYTHON:-python} -m subunit.run discover octavia $LISTOPT $IDOPTION
test_command=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 OS_LOG_CAPTURE=1 ${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./octavia/tests/unit} $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list

17
tox.ini
View File

@ -30,11 +30,14 @@ commands =
[testenv:cover]
whitelist_externals = sh
setenv =
{[testenv]setenv}
PYTHON=coverage run --source octavia --parallel-mode
commands =
coverage erase
sh -c 'COVERAGE_FILE={toxinidir}/.coverage-py27 python setup.py testr --coverage --testr-args='{posargs}''
sh -c 'COVERAGE_FILE={toxinidir}/.coverage-functional OS_TEST_PATH={toxinidir}/octavia/tests/functional python setup.py testr --coverage --testr-args='{posargs}''
coverage combine {toxinidir}/.coverage-py27 {toxinidir}/.coverage-functional
sh -c 'OS_TEST_PATH={toxinidir}/octavia/tests/unit stestr run {posargs}'
sh -c 'OS_TEST_PATH={toxinidir}/octavia/tests/functional stestr run {posargs}'
coverage combine
coverage report --fail-under=80 --skip-covered
# Generate a new HTML report with the combined results
# otherwise the HTML report will only show partial results
@ -151,7 +154,9 @@ commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasen
passenv = TEMPEST_CONFIG_DIR
setenv =
OS_TEST_PATH={toxinidir}/octavia/tests/tempest/v1/api
OS_TESTR_CONCURRENCY=1
commands =
stestr run --concurrency 1 '{posargs}'
stestr slowest
# If you are running the tests locally you should set the env variable
# TEMPEST_CONFIG_DIR=/opt/stack/tempest/etc
@ -159,4 +164,6 @@ setenv =
passenv = TEMPEST_CONFIG_DIR
setenv =
OS_TEST_PATH={toxinidir}/octavia/tests/tempest/v1/scenario
OS_TESTR_CONCURRENCY=1
commands =
stestr run --concurrency 1 '{posargs}'
stestr slowest