[PATCH 8/8] python-utils-r1.eclass: workaround bad interaction with pytest-{timeout,rerunfailures}
Michał Górny <[email protected]>
| Newsgroups | gmane.linux.gentoo.devel |
|---|---|
| Message-ID | <[email protected]> |
From: Alfred Wingate <[email protected]> Bug: https://bugs.gentoo.org/931020 Bug: https://bugs.gentoo.org/907289 Signed-off-by: Alfred Wingate <[email protected]> Signed-off-by: Michał Górny <[email protected]> --- eclass/python-utils-r1.eclass | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index a060115800477..462126a47970d 100644 --- a/eclass/python-utils-r1.eclass +++ b/eclass/python-utils-r1.eclass @@ -1561,6 +1561,15 @@ epytest() { args+=( "--timeout=${EPYTEST_TIMEOUT}" ) + + if [[ -n ${EPYTEST_RERUNS} ]]; then + # This option helps with hangs in some cases when these plugins are used together. + # https://github.com/pytest-dev/pytest-timeout/issues/18 + # https://github.com/pytest-dev/pytest-rerunfailures/issues/99 + args+=( + -o timeout_func_only=true + ) + fi fi if [[ ${EPYTEST_XDIST} ]]; then