Skip to content

Commit

Permalink
build: guard test-doc recipe with node_use_openssl
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
  • Loading branch information
danbev authored and BridgeAR committed Jun 17, 2019
1 parent 50c8038 commit 47dc5b2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -586,8 +586,12 @@ test-hash-seed: all

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

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

0 comments on commit 47dc5b2

Please sign in to comment.