Skip to content

Commit

Permalink
nodejs: run JS test suite as part of the checks
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 committed May 23, 2024
1 parent 044fbf6 commit 7e800e8
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 2 deletions.
18 changes: 18 additions & 0 deletions pkgs/development/web/nodejs/jstest-only-make-target.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Add target to run JS test suite

--- old/Makefile
+++ new/Makefile
@@ -305,4 +305,12 @@ v8:

+.PHONY: jstest-no-addons
+jstest-no-addons: CI_SKIP_TESTS=addons
+jstest-no-addons: jstest-only
+
.PHONY: jstest
-jstest: build-addons build-js-native-api-tests build-node-api-tests ## Runs addon tests and JS tests
+jstest: build-addons build-js-native-api-tests build-node-api-tests jstest-only ## Runs addon tests and JS tests
+
+.PHONY: jstest-only
+.NOTPARALLEL: jstest-only
+jstest-only:
$(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=$(BUILDTYPE_LOWER) \
9 changes: 7 additions & 2 deletions pkgs/development/web/nodejs/nodejs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,15 @@ let
"build-node-api-tests"
"tooltest"
"cctest"
"jstest-only"
];

# Do not create __pycache__ when running tests.
checkFlags = [ "PYTHONDONTWRITEBYTECODE=1" ];
checkFlags = [
# Do not create __pycache__ when running tests.
"PYTHONDONTWRITEBYTECODE=1"
# Skip some tests that are not passing in this context
"CI_SKIP_TESTS=addons,test-setproctitle,test-tls-client-auth,test-tls-sni-option,test-https-foafssl"
];

postInstall = ''
HOST_PATH=$out/bin patchShebangs --host $out
Expand Down
1 change: 1 addition & 0 deletions pkgs/development/web/nodejs/v18.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@ buildNodejs {
./revert-arm64-pointer-auth.patch
./node-npm-build-npm-package-logic.patch
./trap-handler-backport.patch
./jstest-only-make-target.patch
];
}
1 change: 1 addition & 0 deletions pkgs/development/web/nodejs/v20.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ buildNodejs {
./disable-darwin-v8-system-instrumentation-node19.patch
./bypass-darwin-xcrun-node16.patch
./node-npm-build-npm-package-logic.patch
./jstest-only-make-target.patch
];
}
1 change: 1 addition & 0 deletions pkgs/development/web/nodejs/v22.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ buildNodejs {
./disable-darwin-v8-system-instrumentation-node19.patch
./bypass-darwin-xcrun-node16.patch
./node-npm-build-npm-package-logic.patch
./jstest-only-make-target.patch
];
}

0 comments on commit 7e800e8

Please sign in to comment.