diff mbox series

[meta-python,3/5] new recipe: python3-pytest-retry

Message ID 20251122132159.1774324-4-t.f.g.geelen@gmail.com
State Under Review
Headers show
Series [meta-python,1/5] new recipe: python3-pytest-httpx | expand

Commit Message

Tom Geelen Nov. 22, 2025, 1:21 p.m. UTC
Description: Adds the ability to retry flaky tests in CI environments
Signed-off-by: Tom Geelen <t.f.g.geelen@gmail.com>
---
 .../include/ptest-packagelists-meta-python.inc   |  1 +
 .../packagegroups/packagegroup-meta-python.bb    |  1 +
 .../python/python3-pytest-retry_1.7.0.bb         | 16 ++++++++++++++++
 3 files changed, 18 insertions(+)
 create mode 100644 meta-python/recipes-devtools/python/python3-pytest-retry_1.7.0.bb

Comments

Khem Raj Nov. 23, 2025, 8:08 a.m. UTC | #1
Ptests are failing for qemuarm64

{'python3-pytest-retry':
['tests/test_retry_plugin.py:test_no_retry_on_pass',

'tests/test_retry_plugin.py:test_no_retry_on_fail_without_plugin',

'tests/test_retry_plugin.py:test_no_retry_on_skip_mark',

'tests/test_retry_plugin.py:test_no_retry_on_skip_call',

'tests/test_retry_plugin.py:test_no_retry_on_xfail_mark',

'tests/test_retry_plugin.py:test_no_retry_on_xpass',

'tests/test_retry_plugin.py:test_no_retry_on_strict_xpass',

'tests/test_retry_plugin.py:test_retry_fails_after_consistent_setup_failure',

'tests/test_retry_plugin.py:test_retry_exits_immediately_on_teardown_failure',

'tests/test_retry_plugin.py:test_retry_fails_after_consistent_test_failure',

'tests/test_retry_plugin.py:test_retry_passes_after_temporary_test_failure',

'tests/test_retry_plugin.py:test_custom_retry_outcome_for_reporting_compatibility',

'tests/test_retry_plugin.py:test_retry_passes_after_temporary_test_failure_with_flaky_mark',

'tests/test_retry_plugin.py:test_retries_if_flaky_mark_is_applied_without_options',

'tests/test_retry_plugin.py:test_fixtures_are_retried_with_test',

'tests/test_retry_plugin.py:test_retry_executes_class_scoped_fixture',

'tests/test_retry_plugin.py:test_retry_executes_module_scoped_fixture',

'tests/test_retry_plugin.py:test_retry_fails_if_temporary_failures_exceed_retry_limit',

'tests/test_retry_plugin.py:test_retry_delay_from_mark_between_attempts',

'tests/test_retry_plugin.py:test_retry_delay_from_command_line_between_attempts',

'tests/test_retry_plugin.py:test_passing_outcome_is_available_from_item_stash',

'tests/test_retry_plugin.py:test_failed_outcome_is_available_from_item_stash',

'tests/test_retry_plugin.py:test_skipped_outcome_is_available_from_item_stash',

'tests/test_retry_plugin.py:test_duration_is_available_from_item_stash',

'tests/test_retry_plugin.py:test_failed_outcome_after_successful_teardown',

'tests/test_retry_plugin.py:test_failed_outcome_after_unsuccessful_setup',

'tests/test_retry_plugin.py:test_failed_outcome_after_unsuccessful_teardown',

'tests/test_retry_plugin.py:test_attempts_are_always_available_from_item_stash',

'tests/test_retry_plugin.py:test_global_filtered_exception_is_retried',

'tests/test_retry_plugin.py:test_temporary_filtered_exception_fails_when_attempts_exceeded',

'tests/test_retry_plugin.py:test_temporary_exception_is_not_retried_if_filter_not_matched',

'tests/test_retry_plugin.py:test_temporary_exception_is_retried_if_not_globally_excluded',

'tests/test_retry_plugin.py:test_temporary_exception_fails_if_not_excluded_and_attempts_exceeded',

'tests/test_retry_plugin.py:test_temporary_exception_is_not_retried_if_excluded',

'tests/test_retry_plugin.py:test_flaky_mark_exception_filter_param_overrides_global_filter',

'tests/test_retry_plugin.py:test_attempt_count_is_correct',

'tests/test_retry_plugin.py:test_flaky_mark_overrides_command_line_options',

'tests/test_retry_plugin.py:test_configuration_by_ini_file',

'tests/test_retry_plugin.py:test_configuration_by_pyproject_toml_file',

'tests/test_retry_plugin.py:test_duration_in_overwrite_timings_mode',

'tests/test_retry_plugin.py:test_duration_in_cumulative_timings_mode',

'tests/test_retry_plugin.py:test_conditional_flaky_marks_evaluate_correctly',

'tests/test_retry_plugin.py:test_stack_trace_depth_uses_verbosity_count[vv]',

'tests/test_retry_plugin.py:test_stack_trace_depth_uses_verbosity_count[vvv]',

'tests/test_retry_plugin.py:test_stack_trace_depth_uses_verbosity_count[vvvv]']}

On Sat, Nov 22, 2025 at 5:22 AM Tom Geelen via lists.openembedded.org
<t.f.g.geelen=gmail.com@lists.openembedded.org> wrote:

> Description: Adds the ability to retry flaky tests in CI environments
> Signed-off-by: Tom Geelen <t.f.g.geelen@gmail.com>
> ---
>  .../include/ptest-packagelists-meta-python.inc   |  1 +
>  .../packagegroups/packagegroup-meta-python.bb    |  1 +
>  .../python/python3-pytest-retry_1.7.0.bb         | 16 ++++++++++++++++
>  3 files changed, 18 insertions(+)
>  create mode 100644 meta-python/recipes-devtools/python/
> python3-pytest-retry_1.7.0.bb
>
> diff --git a/meta-python/conf/include/ptest-packagelists-meta-python.inc
> b/meta-python/conf/include/ptest-packagelists-meta-python.inc
> index 1cb419a721..d2794d5df1 100644
> --- a/meta-python/conf/include/ptest-packagelists-meta-python.inc
> +++ b/meta-python/conf/include/ptest-packagelists-meta-python.inc
> @@ -77,6 +77,7 @@ PTESTS_FAST_META_PYTHON = "\
>      python3-pytest-httpx \
>      python3-pytest-mock \
>      python3-pytest-picked \
> +    python3-pytest-retry \
>      python3-pytest-sugar \
>      python3-pytoml \
>      python3-pyyaml-include \
> diff --git a/meta-python/recipes-core/packagegroups/
> packagegroup-meta-python.bb b/meta-python/recipes-core/packagegroups/
> packagegroup-meta-python.bb
> index d3abc0761f..dfc35f946f 100644
> --- a/meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb
> +++ b/meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb
> @@ -352,6 +352,7 @@ RDEPENDS:packagegroup-meta-python3 = "\
>      python3-pytest-lazy-fixtures \
>      python3-pytest-metadata \
>      python3-pytest-picked\
> +    python3-pytest-retry \
>      python3-pytest-tempdir \
>      python3-pytest-timeout \
>      python3-pytest-xdist \
> diff --git a/meta-python/recipes-devtools/python/
> python3-pytest-retry_1.7.0.bb b/meta-python/recipes-devtools/python/
> python3-pytest-retry_1.7.0.bb
> new file mode 100644
> index 0000000000..e92122aa63
> --- /dev/null
> +++ b/meta-python/recipes-devtools/python/python3-pytest-retry_1.7.0.bb
> @@ -0,0 +1,16 @@
> +SUMMARY = "Adds the ability to retry flaky tests in CI environments"
> +HOMEPAGE = "https://github.com/str0zzapreti/pytest-retry"
> +LICENSE = "MIT"
> +LIC_FILES_CHKSUM = "file://LICENSE;md5=c25bd3d1db774af27b10acd6f80bf939"
> +RECIPE_MAINTAINER = "Tom Geelen <t.f.g.geelen@gmail.com>"
> +
> +SRC_URI[sha256sum] =
> "f8d52339f01e949df47c11ba9ee8d5b362f5824dff580d3870ec9ae0057df80f"
> +
> +inherit pypi python_setuptools_build_meta ptest-python-pytest
> +
> +RDEPENDS:${PN} += "\
> +    python3-pytest (>=7.0.0) \
> +"
> +
> +PYPI_PACKAGE = "pytest_retry"
> +UPSTREAM_CHECK_PYPI_PACKAGE = "${PYPI_PACKAGE}"
> --
> 2.43.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#121975):
> https://lists.openembedded.org/g/openembedded-devel/message/121975
> Mute This Topic: https://lists.openembedded.org/mt/116422739/1997914
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [
> raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
diff mbox series

Patch

diff --git a/meta-python/conf/include/ptest-packagelists-meta-python.inc b/meta-python/conf/include/ptest-packagelists-meta-python.inc
index 1cb419a721..d2794d5df1 100644
--- a/meta-python/conf/include/ptest-packagelists-meta-python.inc
+++ b/meta-python/conf/include/ptest-packagelists-meta-python.inc
@@ -77,6 +77,7 @@  PTESTS_FAST_META_PYTHON = "\
     python3-pytest-httpx \
     python3-pytest-mock \
     python3-pytest-picked \
+    python3-pytest-retry \
     python3-pytest-sugar \
     python3-pytoml \
     python3-pyyaml-include \
diff --git a/meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb b/meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb
index d3abc0761f..dfc35f946f 100644
--- a/meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb
+++ b/meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb
@@ -352,6 +352,7 @@  RDEPENDS:packagegroup-meta-python3 = "\
     python3-pytest-lazy-fixtures \
     python3-pytest-metadata \
     python3-pytest-picked\
+    python3-pytest-retry \
     python3-pytest-tempdir \
     python3-pytest-timeout \
     python3-pytest-xdist \
diff --git a/meta-python/recipes-devtools/python/python3-pytest-retry_1.7.0.bb b/meta-python/recipes-devtools/python/python3-pytest-retry_1.7.0.bb
new file mode 100644
index 0000000000..e92122aa63
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-pytest-retry_1.7.0.bb
@@ -0,0 +1,16 @@ 
+SUMMARY = "Adds the ability to retry flaky tests in CI environments"
+HOMEPAGE = "https://github.com/str0zzapreti/pytest-retry"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=c25bd3d1db774af27b10acd6f80bf939"
+RECIPE_MAINTAINER = "Tom Geelen <t.f.g.geelen@gmail.com>"
+
+SRC_URI[sha256sum] = "f8d52339f01e949df47c11ba9ee8d5b362f5824dff580d3870ec9ae0057df80f"
+
+inherit pypi python_setuptools_build_meta ptest-python-pytest
+
+RDEPENDS:${PN} += "\
+    python3-pytest (>=7.0.0) \
+"
+
+PYPI_PACKAGE = "pytest_retry"
+UPSTREAM_CHECK_PYPI_PACKAGE = "${PYPI_PACKAGE}"