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