From 1483ac22f765c6e01502dfe2114d5d2c6e2a3aab Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Fri, 12 Jul 2024 10:47:14 -0400 Subject: [PATCH] Skip benchmark tests on RHEL This avoids dependencies on the otherwise unnecessary certifi and pytest-benchmark. --- python-cryptography.spec | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/python-cryptography.spec b/python-cryptography.spec index e6fe8cd..edb70ca 100644 --- a/python-cryptography.spec +++ b/python-cryptography.spec @@ -40,15 +40,15 @@ BuildRequires: python%{python3_pkgversion}-setuptools-rust >= 0.11.4 %if %{with tests} %if 0%{?fedora} +BuildRequires: python%{python3_pkgversion}-certifi BuildRequires: python%{python3_pkgversion}-hypothesis >= 1.11.4 BuildRequires: python%{python3_pkgversion}-iso8601 BuildRequires: python%{python3_pkgversion}-pretend +BuildRequires: python%{python3_pkgversion}-pytest-benchmark BuildRequires: python%{python3_pkgversion}-pytest-xdist BuildRequires: python%{python3_pkgversion}-pytz %endif -BuildRequires: python%{python3_pkgversion}-certifi BuildRequires: python%{python3_pkgversion}-pytest >= 6.2.0 -BuildRequires: python%{python3_pkgversion}-pytest-benchmark BuildRequires: python%{python3_pkgversion}-pytest-subtests >= 0.5.0 %endif @@ -83,6 +83,9 @@ rm src/rust/Cargo.lock # Remove cosmetical pytest-subtests 0.10.0 option sed -i 's,--no-subtests-shortletter,,' pyproject.toml +%if ! 0%{?fedora} +sed -i 's,--benchmark-disable,,' pyproject.toml +%endif %generate_buildrequires @@ -117,8 +120,8 @@ find . -name .keep -print -delete %check %if %{with tests} %if 0%{?rhel} -# skip hypothesis and pytz tests on RHEL -rm -rf tests/hypothesis tests/x509 +# skip benchmark, hypothesis, and pytz tests on RHEL +rm -rf tests/bench tests/hypothesis tests/x509 # append skipper to skip iso8601 and pretend tests cat < %{SOURCE2} >> tests/conftest.py %endif