diff mbox series

[meta-python] python3-whoosh: Fix an intermittent ptest

Message ID 20240405020707.424596-1-raj.khem@gmail.com
State New
Headers show
Series [meta-python] python3-whoosh: Fix an intermittent ptest | expand

Commit Message

Khem Raj April 5, 2024, 2:07 a.m. UTC
It fails sometimes when system is under stress

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...nstic-test_minimize_dfa-test-as-XFAI.patch | 29 +++++++++++++++++++
 .../python/python3-whoosh_2.7.4.bb            |  2 ++
 2 files changed, 31 insertions(+)
 create mode 100644 meta-python/recipes-devtools/python/python3-whoosh/0001-Mark-non-determinstic-test_minimize_dfa-test-as-XFAI.patch
diff mbox series

Patch

diff --git a/meta-python/recipes-devtools/python/python3-whoosh/0001-Mark-non-determinstic-test_minimize_dfa-test-as-XFAI.patch b/meta-python/recipes-devtools/python/python3-whoosh/0001-Mark-non-determinstic-test_minimize_dfa-test-as-XFAI.patch
new file mode 100644
index 0000000000..91fea24524
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-whoosh/0001-Mark-non-determinstic-test_minimize_dfa-test-as-XFAI.patch
@@ -0,0 +1,29 @@ 
+From ede95a4f4487b4fc3cad8452ae388376966fca0e Mon Sep 17 00:00:00 2001
+From: Chris Lamb <lamby@debian.org>
+Date: Fri, 5 Apr 2019 15:48:23 +0200
+Subject: [PATCH] Mark non-determinstic test_minimize_dfa test as XFAIL
+
+Sourced from Debian [1]
+[1] https://sources.debian.org/src/python-whoosh/2.7.4%2Bgit6-g9134ad92-8/debian/patches/0003-Mark-non-determinstic-test_minimize_dfa-test-as-XFAI.patch/
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ tests/test_automata.py | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/tests/test_automata.py b/tests/test_automata.py
+index daab96c..7031dc3 100644
+--- a/tests/test_automata.py
++++ b/tests/test_automata.py
+@@ -327,6 +327,7 @@ def test_regular():
+     assert not ex.accept("bc")
+ 
+ 
++@pytest.mark.xfail(strict=False)
+ def test_minimize_dfa():
+     # Example from www.cs.odu.edu/~toida/nerzic/390teched/regular/fa/min-fa.html
+ 
+-- 
+2.44.0
+
diff --git a/meta-python/recipes-devtools/python/python3-whoosh_2.7.4.bb b/meta-python/recipes-devtools/python/python3-whoosh_2.7.4.bb
index 38d3e1cecd..406de2e525 100644
--- a/meta-python/recipes-devtools/python/python3-whoosh_2.7.4.bb
+++ b/meta-python/recipes-devtools/python/python3-whoosh_2.7.4.bb
@@ -7,6 +7,8 @@  Whoosh works can be extended or replaced to meet your needs exactly."
 LICENSE = "BSD-2-Clause"
 LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=05303186defc6141143629961c7c8a60"
 
+SRC_URI += "file://0001-Mark-non-determinstic-test_minimize_dfa-test-as-XFAI.patch"
+
 SRC_URI[md5sum] = "893433e9c0525ac043df33e6e04caab2"
 SRC_URI[sha256sum] = "e0857375f63e9041e03fedd5b7541f97cf78917ac1b6b06c1fcc9b45375dda69"