From 8b3688c4bec3e6c17507c3be01d88d248bdc4c8b Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 13 Oct 2023 08:12:52 -0400 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20conditionalize=20the=20pytest-x?= =?UTF-8?q?dist=20BR=20on=20architecture?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pythran.spec | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pythran.spec b/pythran.spec index f20725c..abe3bd0 100644 --- a/pythran.spec +++ b/pythran.spec @@ -49,15 +49,8 @@ BuildRequires: python3-scipy # these packages are not included in RHEL %if %{undefined rhel} -# Running tests in serial makes memory errors, which occur in some tests on -# 32-bit architectures, more reproducible, and makes the output when they occur -# less confusing: we tend to get individual test failures rather than a pytest -# INTERNALERROR. -%if 0%{?__isa_bits} != 32 # this is used for supporting -n auto in %%pytest BuildRequires: python3-pytest-xdist -%global use_pytest_xdist 1 -%endif # this is only used to test integration with ipython BuildRequires: /usr/bin/ipython %endif @@ -155,6 +148,14 @@ k="$k and not test_setup_bdist_install3" k="$k and not test_setup_build3" k="$k and not test_setup_sdist_install3" +# Don’t run tests in parallel on 32-bit architecutres. RRunning tests in serial +# makes memory errors, which occur in some tests on 32-bit architectures, more +# reproducible, and makes the output when they occur less confusing: we tend to +# get individual test failures rather than a pytest INTERNALERROR. +%if %{undefined rhel} && 0%{?__isa_bits} != 32 +%global use_pytest_xdist 1 +%endif + %pytest %{?use_pytest_xdist:-n auto} -k "$k"