%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).
This commit is contained in:
Miro Hrončok 2023-02-05 22:23:05 +01:00
parent 85fc41174d
commit d53d20c711

View File

@ -47,6 +47,7 @@ BuildArch: noarch
%if %{with tests} %if %{with tests}
BuildRequires: python3dist(pytest) BuildRequires: python3dist(pytest)
BuildRequires: python3dist(pytest-xdist)
BuildRequires: python3dist(pyyaml) BuildRequires: python3dist(pyyaml)
BuildRequires: python3dist(packaging) BuildRequires: python3dist(packaging)
BuildRequires: python3dist(pip) BuildRequires: python3dist(pip)
@ -120,7 +121,7 @@ install -pm 644 pyproject_wheel.py %{buildroot}%{_rpmconfigdir}/redhat/
%if %{with tests} %if %{with tests}
%check %check
export HOSTNAME="rpmbuild" # to speedup tox in network-less mock, see rhbz#1856356 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 # brp-compress is provided as an argument to get the right directory macro expansion
%{python3} compare_mandata.py -f %{_rpmconfigdir}/brp-compress %{python3} compare_mandata.py -f %{_rpmconfigdir}/brp-compress