From 12a9e321bd2c8612ea68cbc4412dab16c1180879 Mon Sep 17 00:00:00 2001 From: Chris Dent Date: Sun, 9 Sep 2018 07:36:09 -0600 Subject: [PATCH] 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 --- .stestr.conf | 9 +++++++++ tox.ini | 12 ++---------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.stestr.conf b/.stestr.conf index 85e4e1278..a06f02ba8 100644 --- a/.stestr.conf +++ b/.stestr.conf @@ -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(?:\.|_)([^_]+) diff --git a/tox.ini b/tox.ini index de807acdb..02c055c3b 100644 --- a/tox.ini +++ b/tox.ini @@ -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