Merge pull request #46079 from oxij/docheck/in-parallel

stdenv: implement enableParallelChecking option
This commit is contained in:
John Ericson 2018-09-05 11:32:27 -04:00 committed by GitHub
commit 2dda26c9d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 6 deletions

View File

@ -51,6 +51,7 @@ stdenv.mkDerivation rec {
gettextNeedsLdflags = stdenv.hostPlatform.libc != "glibc" && !stdenv.hostPlatform.isMusl;
enableParallelBuilding = true;
enableParallelChecking = false; # fails sometimes
meta = with lib; {
description = "Well integrated set of translation tools and documentation";

View File

@ -227,6 +227,8 @@ rec {
inherit doCheck doInstallCheck;
inherit outputs;
} // lib.optionalAttrs (attrs.enableParallelBuilding or false) {
enableParallelChecking = attrs.enableParallelChecking or true;
} // lib.optionalAttrs (hardeningDisable != [] || hardeningEnable != []) {
NIX_HARDENING_ENABLE = enabledHardeningOptions;
} // lib.optionalAttrs (stdenv.buildPlatform.isDarwin) {

View File

@ -1044,7 +1044,7 @@ checkPhase() {
# Old bash empty array hack
# shellcheck disable=SC2086
local flagsArray=(
${enableParallelBuilding:+-j${NIX_BUILD_CORES} -l${NIX_BUILD_CORES}}
${enableParallelChecking:+-j${NIX_BUILD_CORES} -l${NIX_BUILD_CORES}}
$makeFlags ${makeFlagsArray+"${makeFlagsArray[@]}"}
${checkFlags:-VERBOSE=y} ${checkFlagsArray+"${checkFlagsArray[@]}"}
${checkTarget}
@ -1176,7 +1176,7 @@ installCheckPhase() {
# Old bash empty array hack
# shellcheck disable=SC2086
local flagsArray=(
${enableParallelBuilding:+-j${NIX_BUILD_CORES} -l${NIX_BUILD_CORES}}
${enableParallelChecking:+-j${NIX_BUILD_CORES} -l${NIX_BUILD_CORES}}
$makeFlags ${makeFlagsArray+"${makeFlagsArray[@]}"}
$installCheckFlags ${installCheckFlagsArray+"${installCheckFlagsArray[@]}"}
${installCheckTarget:-installcheck}

View File

@ -23,8 +23,6 @@ stdenv.mkDerivation rec {
outputs = [ "out" "geoip" ];
enableParallelBuilding = true;
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ libevent openssl zlib ] ++
stdenv.lib.optionals stdenv.isLinux [ libseccomp systemd libcap ];
@ -37,14 +35,17 @@ stdenv.mkDerivation rec {
--replace 'exec torsocks' 'exec ${torsocks}/bin/torsocks'
'';
enableParallelBuilding = true;
enableParallelChecking = false; # 4 tests fail randomly
doCheck = true;
postInstall = ''
mkdir -p $geoip/share/tor
mv $out/share/tor/geoip{,6} $geoip/share/tor
rm -rf $out/share/tor
'';
doCheck = true;
passthru.updateScript = import ./update.nix {
inherit (stdenv) lib;
inherit