From 61966db095448c5a015cdbf3ce9a99e7f4f0de3c Mon Sep 17 00:00:00 2001 From: Flatcar Buildbot Date: Mon, 3 Nov 2025 07:10:26 +0000 Subject: [PATCH] eclass/python-utils-r1: Sync with Gentoo It's from Gentoo commit ddda228a67a145f1baed788b5a605dc382ddc9a9. Signed-off-by: Flatcar Buildbot --- .../portage-stable/eclass/python-utils-r1.eclass | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/sdk_container/src/third_party/portage-stable/eclass/python-utils-r1.eclass b/sdk_container/src/third_party/portage-stable/eclass/python-utils-r1.eclass index e213273a3a..b08dbd586b 100644 --- a/sdk_container/src/third_party/portage-stable/eclass/python-utils-r1.eclass +++ b/sdk_container/src/third_party/portage-stable/eclass/python-utils-r1.eclass @@ -1538,9 +1538,17 @@ epytest() { ) fi - args+=( - "--reruns=${EPYTEST_RERUNS}" - ) + if has_version ">=dev-python/pytest-rerunfailures-16.1"; then + args+=( + # --reruns only adds N reruns for tests not marked for reruns + # --force-reruns overrides the rerun count for all tests + "--force-reruns=${EPYTEST_RERUNS}" + ) + else + args+=( + "--reruns=${EPYTEST_RERUNS}" + ) + fi fi if [[ -n ${EPYTEST_TIMEOUT} ]]; then