%check: Use %pytest -n auto for faster build

The speedup is tiny but noticeable (pytest took 8.49s, now 5.87s on my 8-core workstation).

Related: rhbz#2168193
This commit is contained in:
Miro Hrončok 2023-02-05 22:23:05 +01:00
parent ecf0a140a8
commit 6923c14ba5

View File

@ -49,6 +49,7 @@ BuildArch: noarch
%if %{with tests}
BuildRequires: python3dist(pytest)
BuildRequires: python3dist(pytest-xdist)
BuildRequires: python3dist(pyyaml)
BuildRequires: python3dist(packaging)
BuildRequires: python3dist(pip)
@ -122,7 +123,7 @@ install -pm 644 pyproject_wheel.py %{buildroot}%{_rpmconfigdir}/redhat/
%if %{with tests}
%check
export HOSTNAME="rpmbuild" # to speedup tox in network-less mock, see rhbz#1856356
%pytest -vv --doctest-modules
%pytest -vv --doctest-modules -n auto
# brp-compress is provided as an argument to get the right directory macro expansion
%{python3} compare_mandata.py -f %{_rpmconfigdir}/brp-compress