buildGoPackage: Fix parallel test pid computation
This commit is contained in:
parent
859576c895
commit
c2ae91a413
@ -120,15 +120,15 @@ go.stdenv.mkDerivation (
|
|||||||
if [ -n "$subPackages" ] ; then
|
if [ -n "$subPackages" ] ; then
|
||||||
for p in $subPackages ; do
|
for p in $subPackages ; do
|
||||||
go test -p $NIX_BUILD_CORES -v $goPackagePath/$p &
|
go test -p $NIX_BUILD_CORES -v $goPackagePath/$p &
|
||||||
done
|
|
||||||
PIDS+=("$!")
|
PIDS+=("$!")
|
||||||
|
done
|
||||||
else
|
else
|
||||||
pushd go/src
|
pushd go/src
|
||||||
while read d; do
|
while read d; do
|
||||||
go test -p $NIX_BUILD_CORES -v $d &
|
go test -p $NIX_BUILD_CORES -v $d &
|
||||||
|
PIDS+=("$!")
|
||||||
done < <(find $goPackagePath -type f -name \*_test.go -exec dirname {} \; | sort | uniq)
|
done < <(find $goPackagePath -type f -name \*_test.go -exec dirname {} \; | sort | uniq)
|
||||||
popd
|
popd
|
||||||
PIDS+=("$!")
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Exit on error from the parallel process
|
# Exit on error from the parallel process
|
||||||
|
Loading…
x
Reference in New Issue
Block a user