Run test in parallel in Fedora
Sphinx' test run lasts quite long, so running in parallel is beneficial for everybody building the package. The parallel run uncovered a test bug, fix for which has been submitted upstream.
This commit is contained in:
parent
ae5756e761
commit
49315c5c91
2 changed files with 38 additions and 1 deletions
29
14507.patch
Normal file
29
14507.patch
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
From b9386884a3a4d65db1d69b83026339c5d72442d5 Mon Sep 17 00:00:00 2001
|
||||
From: Karolina Surma <ksurma@redhat.com>
|
||||
Date: Mon, 29 Jun 2026 11:00:42 +0200
|
||||
Subject: [PATCH] Fix test_gettext_literalblock_additional to use the correct
|
||||
test root
|
||||
|
||||
test-root doesn't contain the source file for literalblock.pot. The test
|
||||
passed sequentially because other tests using test root 'intl' left the
|
||||
file in the same srcdir. With pytest-xdist, the test started correctly failing,
|
||||
as no leftover file was available during the test run.
|
||||
Using the test root 'intl', which contains literalblock.txt, fixes the
|
||||
test.
|
||||
---
|
||||
tests/test_builders/test_build_gettext.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tests/test_builders/test_build_gettext.py b/tests/test_builders/test_build_gettext.py
|
||||
index 30798cc5070..8a1827ba281 100644
|
||||
--- a/tests/test_builders/test_build_gettext.py
|
||||
+++ b/tests/test_builders/test_build_gettext.py
|
||||
@@ -288,7 +288,7 @@ def test_gettext_prolog_epilog_substitution_excluded(app: SphinxTestApp) -> None
|
||||
|
||||
@pytest.mark.sphinx(
|
||||
'gettext',
|
||||
- testroot='root',
|
||||
+ testroot='intl',
|
||||
srcdir='gettext',
|
||||
confoverrides={
|
||||
'gettext_compact': False,
|
||||
|
|
@ -44,6 +44,10 @@ Patch: sphinx-test_theming.patch
|
|||
# Fix for test_stemmer failing with Python 3.15+, merged upstream
|
||||
Patch: https://github.com/sphinx-doc/sphinx/pull/14474.patch
|
||||
|
||||
# Fix test_gettext_literalblock_additional failure with pytest-xdist:
|
||||
# the test used testroot='root' which lacks literalblock.txt
|
||||
Patch: https://github.com/sphinx-doc/sphinx/pull/14507.patch
|
||||
|
||||
# Make the first party extensions optional
|
||||
# This removes the runtime dependencies on:
|
||||
# - sphinxcontrib.applehelp
|
||||
|
|
@ -88,6 +92,10 @@ BuildRequires: texinfo
|
|||
BuildRequires: ImageMagick
|
||||
%endif
|
||||
|
||||
%if %{undefined rhel}
|
||||
BuildRequires: python%{python3_pkgversion}-pytest-xdist
|
||||
%endif
|
||||
|
||||
%if %{undefined rhel} && %{with latex_tests}
|
||||
BuildRequires: texlive-collection-fontsrecommended
|
||||
BuildRequires: texlive-collection-latex
|
||||
|
|
@ -480,7 +488,7 @@ k="${k} and not test_term_in_heading_and_section and not test_IndexBuilder"
|
|||
k="${k} and not test_check_js_search_indexes"
|
||||
%endif
|
||||
|
||||
%pytest -k "${k}"
|
||||
%pytest -k "${k}" %{!?rhel:-n auto}
|
||||
%endif
|
||||
|
||||
%files -n python%{python3_pkgversion}-sphinx -f sphinx.lang
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue