From d7f46fbb5c40e7e9a165adf4f82669ae35c5b055 Mon Sep 17 00:00:00 2001 From: Ivan Trubach Date: Wed, 17 Jul 2024 20:14:57 +0300 Subject: [PATCH] nodejs: fix tests and disable parallel checking --- pkgs/development/web/nodejs/nodejs.nix | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/pkgs/development/web/nodejs/nodejs.nix b/pkgs/development/web/nodejs/nodejs.nix index dbb7bee531797..93421c709c43f 100644 --- a/pkgs/development/web/nodejs/nodejs.nix +++ b/pkgs/development/web/nodejs/nodejs.nix @@ -134,7 +134,14 @@ let strictDeps = true; - env = lib.optionalAttrs (stdenv.isDarwin && stdenv.isx86_64) { + env = { + # Tell ninja to avoid ANSI sequences, otherwise we don’t see build + # progress in Nix logs. + # + # Note: do not set TERM=dumb environment variable globally, it is used in + # test-ci-js test suite to skip tests that otherwise run fine. + NINJA = "TERM=dumb ninja"; + } // lib.optionalAttrs (stdenv.isDarwin && stdenv.isx86_64) { # Make sure libc++ uses `posix_memalign` instead of `aligned_alloc` on x86_64-darwin. # Otherwise, nodejs would require the 11.0 SDK and macOS 10.15+. NIX_CFLAGS_COMPILE = "-D__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__=101300"; @@ -216,12 +223,6 @@ let enableParallelBuilding = true; - makeFlags = [ - # Tell ninja to avoid ANSI sequences, otherwise we don’t see build - # progress in Nix logs. - "TERM=dumb" - ]; - # Don't allow enabling content addressed conversion as `nodejs` # checksums it's image before conversion happens and image loading # breaks: @@ -246,6 +247,9 @@ let doCheck = canExecute; + # See https://github.com/nodejs/node/issues/22006 + enableParallelChecking = false; + # Some dependencies required for tools/doc/node_modules (and therefore # test-addons, jstest and others) target are not included in the tarball. # Run test targets that do not require network access. @@ -260,8 +264,6 @@ let # than a year (Node.js 18 will be EOL at 2025-04-30). Note that these # failures are specific to Nix sandbox on macOS and should not affect # actual functionality. - ] ++ lib.optionals (!stdenv.isDarwin) [ - # TODO: JS test suite is too flaky on Darwin; revisit at a later date. "test-ci-js" ]);