1pytestXdistHook() {
2 pytestFlagsArray+=(
3 "--numprocesses=$NIX_BUILD_CORES"
4 )
5}
6
7# the flags should be added before pytestCheckHook runs so
8# until we have dependency mechanism in generic builder, we need to use this ugly hack.
9
10if [ -z "${dontUsePytestXdist-}" ] && [ -z "${dontUsePytestCheck-}" ]; then
11 if [[ " ${preDistPhases:-} " =~ " pytestCheckPhase " ]]; then
12 preDistPhases+=" "
13 preDistPhases="${preDistPhases/ pytestCheckPhase / pytestXdistHook pytestCheckPhase }"
14 else
15 preDistPhases+=" pytestXdistHook"
16 fi
17fi