python39Packages.pytest-xdist: run xdist hook before pytestCheckPhase

This commit is contained in:
Artturin 2022-04-06 09:04:48 +03:00 committed by Martin Weinelt
parent 352ae0b79e
commit b5facab1ef

View file

@ -5,6 +5,14 @@ pytestXdistHook() {
)
}
# the flags should be added before pytestCheckHook runs so
# until we have dependency mechanism in generic builder, we need to use this ugly hack.
if [ -z "${dontUsePytestXdist-}" ] && [ -z "${dontUsePytestCheck-}" ]; then
preDistPhases+=" pytestXdistHook"
if [[ " ${preDistPhases:-} " =~ " pytestCheckPhase " ]]; then
preDistPhases+=" "
preDistPhases="${preDistPhases/ pytestCheckPhase / pytestXdistHook pytestCheckPhase }"
else
preDistPhases+=" pytestXdistHook"
fi
fi