From d53d20c711a2ef23d98ed9d9a72ef5a9e8776235 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Sun, 5 Feb 2023 22:23:05 +0100 Subject: [PATCH] %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). --- pyproject-rpm-macros.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject-rpm-macros.spec b/pyproject-rpm-macros.spec index ea02e7f..a06e971 100644 --- a/pyproject-rpm-macros.spec +++ b/pyproject-rpm-macros.spec @@ -47,6 +47,7 @@ BuildArch: noarch %if %{with tests} BuildRequires: python3dist(pytest) +BuildRequires: python3dist(pytest-xdist) BuildRequires: python3dist(pyyaml) BuildRequires: python3dist(packaging) BuildRequires: python3dist(pip) @@ -120,7 +121,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