Control: tags -1 +patch
Hi Adrian,
On Thu, 2023-10-05 at 21:44 +0300, Adrian Bunk wrote:
> =================================== FAILURES
> ===================================
> ____________ test_pattern_jit_compile_success[a+b+c*d*-0-SUCCESS0]
> _____________
>
> pattern = b'a+b+c*d*', options = 0, return_code = 'SUCCESS'
>
> @pytest.mark.parametrize("pattern,options,return_code",
> test_data_pattern_compile_success)
> def test_pattern_jit_compile_success(pattern, options, return_code):
> try:
> p = pcre2.compile(pattern, options=options, jit=True)
> rc = "SUCCESS"
> assert p.jit_size > 0
> except CompileError as e:
> rc = "COMPILE_ERROR"
> except LibraryError as e:
> rc = "LIB_ERROR"
> > assert rc == return_code
> E AssertionError: assert 'LIB_ERROR' == 'SUCCESS'
> E - SUCCESS
> E + LIB_ERROR
>
> tests/test_pattern.py:43: AssertionError
> ...
> utils.pyx:108: LibraryError
> =========================== short test summary info
> ============================
> FAILED
> tests/test_pattern.py::test_pattern_jit_compile_success[a+b+c*d*-0-SUCCESS0]
> FAILED
> tests/test_pattern.py::test_pattern_jit_compile_success[(?<foo>a+b+)c*d*-0-SUCCESS0]
> FAILED
> tests/test_pattern.py::test_pattern_jit_compile_success[\xc3\xa5+\xe2\x88\xab+\xc3\xa7*\xe2\x88\x82*-0-SUCCESS]
> FAILED
> tests/test_pattern.py::test_pattern_jit_compile_success[a+b+c*d*-0-SUCCESS1]
> FAILED
> tests/test_pattern.py::test_pattern_jit_compile_success[(?<foo>a+b+)c*d*-0-SUCCESS1]
> FAILED
> tests/test_pattern.py::test_pattern_jit_compile_success[(?<foo>a+b+)c*d*(?<foo>a+b+)-64-SUCCESS]
> FAILED
> tests/test_pattern.py::test_pattern_jit_compile_success[\xe5+\u222b+\xe7*\u2202*-0-SUCCESS]
> FAILED
> tests/test_pattern.py::test_pattern_jit_compile_success[(?<\u0192\xf8\xf8>a+b+)c*d*-0-SUCCESS]
> FAILED tests/test_pattern.py::test_pattern_jit_findall -
> pcre2.exceptions.Lib...
> FAILED tests/test_pattern.py::test_pattern_jit_split -
> pcre2.exceptions.Libra...
> ======================== 10 failed, 52 passed in 1.60s
> =========================
Easiest solution is just skipping those tests as it's being done on armel,
attaching a patch.
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer
`. `' Physicist
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
--- debian/rules.orig 2024-11-19 12:41:39.000000000 +0100
+++ debian/rules 2025-11-08 22:43:05.132216516 +0100
@@ -6,7 +6,7 @@
include /usr/share/dpkg/architecture.mk
-ifeq ($(DEB_HOST_ARCH),armel)
+ifneq (,$(filter alpha armel hppa m68k sh4 sparc64 x32, $(DEB_HOST_ARCH)))
export PYBUILD_TEST_ARGS=-k 'not (test_pattern_jit)'
endif