Put stestr group_regex in .stestr.conf

This dries up tox.ini a bit while preserving the explanatory
comment. Having the grouping expression on test jobs that don't
require it has only minor impact: the regex is applied to the
list of tests and no groups are found.

Change-Id: I89330cf5b0ace25db6a7575cfa4f93d9575b08ac
This commit is contained in:
Chris Dent 2018-09-09 07:36:09 -06:00
parent 81d40b37b3
commit 12a9e321bd
2 changed files with 11 additions and 10 deletions

View File

@ -1,3 +1,12 @@
[DEFAULT]
test_path=./placement/tests/unit
top_dir=./
# The group_regex describes how stestr will group tests into the same process
# when running concurently. The following ensures that gabbi tests coming from
# the same YAML file are all in the same process. This is important because
# each YAML file represents an ordered sequence of HTTP requests. Note that
# tests which do not match this regex will not be grouped in any special way.
# See the following for more details.
# http://stestr.readthedocs.io/en/latest/MANUAL.html#grouping-tests
# https://gabbi.readthedocs.io/en/latest/#purpose
group_regex=placement\.tests\.functional\.test_api(?:\.|_)([^_]+)

12
tox.ini
View File

@ -72,15 +72,7 @@ envdir = {toxworkdir}/py27
setenv = {[testenv]setenv}
commands =
{[testenv]commands}
# NOTE(cdent): The group_regex describes how stestr will group tests into the
# same process when running concurently. The following ensures that gabbi tests
# coming from the same YAML file are all in the same process. This is important
# because each YAML file represents an ordered sequence of HTTP requests. Note
# that tests which do not match this regex will not be grouped in any
# special way. See the following for more details.
# http://stestr.readthedocs.io/en/latest/MANUAL.html#grouping-tests
# https://gabbi.readthedocs.io/en/latest/#purpose
stestr --test-path=./placement/tests/functional --group_regex=placement\.tests\.functional\.test_api(?:\.|_)([^_]+) run {posargs}
stestr --test-path=./placement/tests/functional run {posargs}
stestr slowest
# TODO(gcb) Merge this into [testenv:functional] when functional tests are gating
@ -121,7 +113,7 @@ setenv =
commands =
{[testenv]commands}
coverage erase
stestr --test-path=./placement/tests --group_regex=placement\.tests\.functional\.test_api(?:\.|_)([^_]+) run {posargs}
stestr --test-path=./placement/tests run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml