Use all but one CPU when unittesting

Previously we removed the CPU limit from stestr to speed up testing.
However, based on log data we have occasionaly failures now due to
exceeding system load limits in the Zuul executor governors.

Based on logs we appear to be just over that limit and a small pullback
may be sufficient to make things reliable. Previously we were dividing
the total cpu count by 2, but now lets try reducing it by 1 instead. On
OpenDev's CI systems this should have us using 7 test processes instead
of 4 when we were dividing by 2.

Change-Id: I1ded37b799780c52dbab6a84c1fde9fae099a08e
This commit is contained in:
Clark Boylan 2021-10-26 10:02:32 -07:00
parent bcaaa3ec4f
commit 7413e5000a
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@ deps =
docker =
docker: zookeeper:3.4
commands =
bash -c 'stestr run --slowest {posargs}'
bash -c 'stestr run --slowest --concurrency=`python -c "import multiprocessing; print(max(int(multiprocessing.cpu_count()-1),1))"` {posargs}'
[testenv:bindep]
# Do not install any requirements. We want this to be fast and work even if