On 32-bit, run tests in serial and skip those that exhaust memory

This commit is contained in:
Benjamin A. Beasley 2023-10-09 09:41:41 -04:00
parent f4b9498bce
commit 5b9e3ded4f
1 changed files with 21 additions and 1 deletions

View File

@ -49,8 +49,15 @@ 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
@ -123,6 +130,17 @@ k="not test_numpy_negative_binomial"
# https://github.com/serge-sans-paille/pythran/pull/1946#issuecomment-992458379
k="$k and not test_interp_6c"
%endif
%if 0%{?__isa_bits} == 32
# These tests cause memory (address space) exhaustion; see discussion in
# https://src.fedoraproject.org/rpms/pythran/pull-request/28.
for t in test_fftn_{8,17,20,22} \
test_{h,ih,ir}fft_{8,14} \
test_{,i}fft_3d{,_axis,f64_axis,int64_axis} \
test_numpy_random_bytes1
do
k="$k and not ${t}"
done
%endif
%ifarch aarch64
# the test is so flaky it makes the build fail almost all the time
k="$k and not test_interp_8"
@ -140,7 +158,8 @@ k="$k and not test_loadext_and_run"
k="$k and not test_setup_bdist_install3"
k="$k and not test_setup_build3"
k="$k and not test_setup_sdist_install3"
%pytest %{?!rhel:-n auto} -k "$k"
%pytest %{?use_pytest_xdist:-n auto} -k "$k"
%files -f %{pyproject_files}
@ -156,6 +175,7 @@ k="$k and not test_setup_sdist_install3"
%changelog
* Thu Oct 05 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 0.14.0-2
- Fix FTBFS: skip tests that need numpy.distutils
- On 32-bit, run tests in serial and skip those that exhaust memory
* Thu Sep 07 2023 Miro Hrončok <mhroncok@redhat.com> - 0.14.0-1
- Update to 0.14.0