mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2025-12-21 21:17:37 -08:00
python-utils-r1.eclass: Use --force-reruns for EPYTEST_RERUNS
Use "--force-reruns" rather than "--reruns" when available. This ensures that the rerun count is respected for all tests, including tests already marked upstream for reruns. Otherwise tests marked "@pytest.mark.flaky" will get rerun only once. Signed-off-by: Michał Górny <mgorny@gentoo.org> Part-of: https://github.com/gentoo/gentoo/pull/44172 Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
parent
cfa5bab4eb
commit
ddda228a67
@ -1538,9 +1538,17 @@ epytest() {
|
|||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
args+=(
|
if has_version ">=dev-python/pytest-rerunfailures-16.1"; then
|
||||||
"--reruns=${EPYTEST_RERUNS}"
|
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
|
fi
|
||||||
|
|
||||||
if [[ -n ${EPYTEST_TIMEOUT} ]]; then
|
if [[ -n ${EPYTEST_TIMEOUT} ]]; then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user