Skip to content

Commit

Permalink
nodejs: fix tests and disable parallel checking
Browse files Browse the repository at this point in the history
  • Loading branch information
tie committed Jul 26, 2024
1 parent 3cf3f6a commit 3dadfa5
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions pkgs/development/web/nodejs/nodejs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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:
Expand All @@ -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.
Expand All @@ -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"
]);

Expand Down

0 comments on commit 3dadfa5

Please sign in to comment.