2022-03-30 21:40:17 +00:00
|
|
|
pytestXdistHook() {
|
2022-04-02 04:16:42 +00:00
|
|
|
pytestFlagsArray+=(
|
|
|
|
"--numprocesses=$NIX_BUILD_CORES"
|
|
|
|
)
|
2022-03-30 21:40:17 +00:00
|
|
|
}
|
|
|
|
|
2022-04-06 06:04:48 +00:00
|
|
|
# the flags should be added before pytestCheckHook runs so
|
|
|
|
# until we have dependency mechanism in generic builder, we need to use this ugly hack.
|
|
|
|
|
2022-03-30 21:40:17 +00:00
|
|
|
if [ -z "${dontUsePytestXdist-}" ] && [ -z "${dontUsePytestCheck-}" ]; then
|
2022-04-06 06:04:48 +00:00
|
|
|
if [[ " ${preDistPhases:-} " =~ " pytestCheckPhase " ]]; then
|
|
|
|
preDistPhases+=" "
|
|
|
|
preDistPhases="${preDistPhases/ pytestCheckPhase / pytestXdistHook pytestCheckPhase }"
|
|
|
|
else
|
|
|
|
preDistPhases+=" pytestXdistHook"
|
|
|
|
fi
|
2022-03-30 21:40:17 +00:00
|
|
|
fi
|