Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at gcc-offload 24 lines 811 B view raw
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="${preDistPhases[*]} " 13 _preDistPhases="${_preDistPhases/ pytestCheckPhase / pytestXdistHook pytestCheckPhase }" 14 if [[ -n "${__structuredAttrs-}" ]]; then 15 preDistPhases=() 16 else 17 preDistPhases="" 18 fi 19 appendToVar preDistPhases $_preDistPhases 20 unset _preDistPhases 21 else 22 appendToVar preDistPhases pytestXdistHook 23 fi 24fi