Execute tests by class, not randomly

The default test runner behavior is to distribute various classes
across many runners, which is fine. But when you have lots of setup
to ensure an environment is correct for tests in a class, you
generally want to execute that together instead of separately.

As such, set the --parallel-class execution option for stestr.

Change-Id: I5a65accfb7e2033690b2934d874141db7f4bf383
This commit is contained in:
Julia Kreger 2023-06-28 06:29:53 -07:00
parent c392814ca8
commit a600895ba3

View File

@ -22,7 +22,7 @@ deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
stestr run --slowest {posargs}
stestr run --slowest --parallel-class {posargs}
passenv = http_proxy
HTTP_PROXY
https_proxy
@ -67,7 +67,7 @@ setenv = VIRTUAL_ENV={envdir}
PYTHON=coverage run --source ironic --omit='*tests*' --parallel-mode
commands =
coverage erase
stestr run {posargs}
stestr run --parallel-class {posargs}
coverage combine
coverage report --omit='*tests*'
coverage html -d ./cover --omit='*tests*'