biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / pytest-xdist / setup-hook.sh
blob9819e0d3ec7d23fe33b222231d8dc2ada23f562f
1 pytestXdistHook() {
2 pytestFlagsArray+=(
3 "--numprocesses=$NIX_BUILD_CORES"
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.
10 if [ -z "${dontUsePytestXdist-}" ] && [ -z "${dontUsePytestCheck-}" ]; then
11 if [[ " ${preDistPhases[*]:-} " =~ " pytestCheckPhase " ]]; then
12 _preDistPhases="${preDistPhases[*]} "
13 _preDistPhases="${_preDistPhases/ pytestCheckPhase / pytestXdistHook pytestCheckPhase }"
14 if [[ -n "${__structuredAttrs-}" ]]; then
15 preDistPhases=()
16 else
17 preDistPhases=""
19 appendToVar preDistPhases $_preDistPhases
20 unset _preDistPhases
21 else
22 appendToVar preDistPhases pytestXdistHook