From fcd8dea9800ae0e74699dc5f8a0f17ede93ba90d Mon Sep 17 00:00:00 2001 From: Carlos Goncalves Date: Sun, 11 Mar 2018 18:49:09 +0100 Subject: [PATCH] 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 d871c2a7fb57f4e99ea74ff26e8037a9316b696d) --- .testr.conf | 5 ----- tox.ini | 17 ++++++++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) delete mode 100644 .testr.conf diff --git a/.testr.conf b/.testr.conf deleted file mode 100644 index 027a7ab973..0000000000 --- a/.testr.conf +++ /dev/null @@ -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 diff --git a/tox.ini b/tox.ini index 4e0b69050e..121292bd57 100644 --- a/tox.ini +++ b/tox.ini @@ -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