mirror of
https://github.com/flatcar/scripts.git
synced 2025-10-17 02:11:06 +02:00
eclass/python-utils-r1: Sync with Gentoo
It's from Gentoo commit 87a034bd840d2d9095bccb29e7cc0922ec29b4ad.
This commit is contained in:
parent
0039630ebe
commit
e9f28dca63
@ -1354,6 +1354,16 @@ _set_epytest_plugins() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# @ECLASS_VARIABLE: EPYTEST_RERUNS
|
||||||
|
# @DEFAULT_UNSET
|
||||||
|
# @DESCRIPTION:
|
||||||
|
# If set to a non-empty value, enables pytest-rerunfailures plugin
|
||||||
|
# and sets rerun count to the specified value. This variable can be
|
||||||
|
# either set in ebuilds with flaky tests, or by user to try if it helps.
|
||||||
|
# If this variable is set prior to calling distutils_enable_tests
|
||||||
|
# in distutils-r1, a test dependency on dev-python/pytest-rerunfailures
|
||||||
|
# is added automatically.
|
||||||
|
|
||||||
# @ECLASS_VARIABLE: EPYTEST_TIMEOUT
|
# @ECLASS_VARIABLE: EPYTEST_TIMEOUT
|
||||||
# @DEFAULT_UNSET
|
# @DEFAULT_UNSET
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
@ -1517,6 +1527,18 @@ epytest() {
|
|||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -n ${EPYTEST_RERUNS} ]]; then
|
||||||
|
if [[ ${PYTEST_PLUGINS} != *pytest_rerunfailures* ]]; then
|
||||||
|
args+=(
|
||||||
|
-p rerunfailures
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
|
args+=(
|
||||||
|
"--reruns=${EPYTEST_RERUNS}"
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ -n ${EPYTEST_TIMEOUT} ]]; then
|
if [[ -n ${EPYTEST_TIMEOUT} ]]; then
|
||||||
if [[ ${PYTEST_PLUGINS} != *pytest_timeout* ]]; then
|
if [[ ${PYTEST_PLUGINS} != *pytest_timeout* ]]; then
|
||||||
args+=(
|
args+=(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user