My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/pkgs/development/python-modules/pytest-xdist/setup-hook.sh

18 lines
587 B

pytestXdistHook() {
pytestFlagsArray+=(
"--numprocesses=$NIX_BUILD_CORES"
"--forked"
)
}
# 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
if [[ " ${preDistPhases:-} " =~ " pytestCheckPhase " ]]; then
preDistPhases+=" "
preDistPhases="${preDistPhases/ pytestCheckPhase / pytestXdistHook pytestCheckPhase }"
else
preDistPhases+=" pytestXdistHook"
fi
fi