Hypothesis Python module applies a 200ms default timeout value on
the tests, that can be violated too easily in qemu without kvm support.

Hypothesis however also has a feature, that in case it is running in a CI
environment, it expects that the host has more load, and it removes this
deadline.

To switch to the CI profile and relax the execution timeouts, this patch
defines the "CI" environment variable in the run-ptest script.

Signed-off-by: Gyorgy Sarvari <[email protected]>
---
 .../recipes-connectivity/python-h2/python3-h2_4.3.0.bb      | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/meta-python/recipes-connectivity/python-h2/python3-h2_4.3.0.bb 
b/meta-python/recipes-connectivity/python-h2/python3-h2_4.3.0.bb
index db181dc0b4..4034ffe7c1 100644
--- a/meta-python/recipes-connectivity/python-h2/python3-h2_4.3.0.bb
+++ b/meta-python/recipes-connectivity/python-h2/python3-h2_4.3.0.bb
@@ -10,3 +10,9 @@ inherit ptest-python-pytest pypi python_setuptools_build_meta
 
 RDEPENDS:${PN} += "python3-hpack python3-hyperframe"
 RDEPENDS:${PN}-ptest += "python3-hypothesis"
+
+do_install_ptest:append(){
+    # by defining CI envvar, hypothesis will use the CI-profile by default,
+    # and will not use tight execution deadlines (which times out easily on 
qemu without kvm)
+    sed -i 's/pytest/CI=1 pytest/' ${D}${PTEST_PATH}/run-ptest
+}
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#123238): 
https://lists.openembedded.org/g/openembedded-devel/message/123238
Mute This Topic: https://lists.openembedded.org/mt/117140224/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to