Merge pull request #46079 from oxij/docheck/in-parallel
stdenv: implement enableParallelChecking option
This commit is contained in:
commit
2dda26c9d4
@ -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";
|
||||
|
@ -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) {
|
||||
|
@ -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}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user