Skip to content

Commit 47dc5b2

Browse files
danbevBridgeAR
authored andcommitted
build: guard test-doc recipe with node_use_openssl
Currently, when configuring --without-ssl the test-doc target fails with the following error: /node/test/common/index.js:707 const crashOnUnhandledRejection = (err) => { throw err; }; ^ Error [ERR_NO_CRYPTO]: Node.js is not compiled with OpenSSL crypto support at Object.assertCrypto (internal/util.js:97:11) at https.js:26:26 at NativeModule.compile (internal/bootstrap/loaders.js:300:5) ... at /node/tools/doc/versions.js:7:19 at new Promise (<anonymous>) at getUrl (/node/tools/doc/versions.js:6:10) Command: out/Release/node /node/test/doctool/test-doctool-html.js [00:02|% 100|+ 3|- 1]: Done make: *** [test-doc] Error 1 This commit guards the test-doc recipe to not run if node was configured without crypto support. PR-URL: #28199 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent 50c8038 commit 47dc5b2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -586,8 +586,12 @@ test-hash-seed: all
586586

587587
.PHONY: test-doc
588588
test-doc: doc-only ## Builds, lints, and verifies the docs.
589-
$(MAKE) lint
590-
$(PYTHON) tools/test.py $(PARALLEL_ARGS) $(CI_DOC)
589+
@if [ "$(shell $(node_use_openssl))" != "true" ]; then \
590+
echo "Skipping test-doc (no crypto)"; \
591+
else \
592+
$(MAKE) lint; \
593+
$(PYTHON) tools/test.py $(PARALLEL_ARGS) $(CI_DOC); \
594+
fi
591595

592596
test-known-issues: all
593597
$(PYTHON) tools/test.py $(PARALLEL_ARGS) known_issues

0 commit comments

Comments
 (0)