diff --git a/Makefile b/Makefile index fc4a094656a452..4cd6baf1c694e4 100644 --- a/Makefile +++ b/Makefile @@ -320,10 +320,16 @@ ifeq ($(OSTYPE),aix) DOCBUILDSTAMP_PREREQS := $(DOCBUILDSTAMP_PREREQS) out/$(BUILDTYPE)/node.exp endif +node_use_openssl = $(shell $(call available-node,"-p" \ + "process.versions.openssl != undefined")) test/addons/.docbuildstamp: $(DOCBUILDSTAMP_PREREQS) tools/doc/node_modules +ifeq ($(node_use_openssl),true) $(RM) -r test/addons/??_*/ [ -x $(NODE) ] && $(NODE) $< || node $< touch $@ +else + @echo "Skipping .docbuildstamp (no crypto)" +endif ADDONS_BINDING_GYPS := \ $(filter-out test/addons/??_*/binding.gyp, \ @@ -1062,15 +1068,17 @@ lint-md-build: tools/remark-cli/node_modules \ .PHONY: tools/doc/node_modules tools/doc/node_modules: - @cd tools/doc && $(call available-node,$(run-npm-install)) +ifeq ($(node_use_openssl),true) + cd tools/doc && $(call available-node,$(run-npm-install)) +else + @echo "Skipping tools/doc/node_modules (no crypto)" +endif .PHONY: lint-md ifneq ("","$(wildcard tools/remark-cli/node_modules/)") LINT_MD_DOC_FILES = $(shell ls doc/*.md doc/**/*.md) run-lint-doc-md = tools/remark-cli/cli.js -q -f $(LINT_MD_DOC_FILES) -node_use_openssl = $(shell $(call available-node,"-p" \ - "process.versions.openssl != undefined")) # Lint all changed markdown files under doc/ tools/.docmdlintstamp: $(LINT_MD_DOC_FILES) ifeq ($(node_use_openssl),true) diff --git a/test/parallel/test-heapdump-http2.js b/test/parallel/test-heapdump-http2.js index cbc1209ab0557f..b503951e65851b 100644 --- a/test/parallel/test-heapdump-http2.js +++ b/test/parallel/test-heapdump-http2.js @@ -2,9 +2,9 @@ 'use strict'; const common = require('../common'); const { recordState } = require('../common/heap'); -const http2 = require('http2'); if (!common.hasCrypto) common.skip('missing crypto'); +const http2 = require('http2'); { const state = recordState(); diff --git a/test/parallel/test-https-request-arguments.js b/test/parallel/test-https-request-arguments.js index 44037ddd6de90b..9dc80094be0d2c 100644 --- a/test/parallel/test-https-request-arguments.js +++ b/test/parallel/test-https-request-arguments.js @@ -1,11 +1,11 @@ 'use strict'; const common = require('../common'); const assert = require('assert'); -const https = require('https'); const fixtures = require('../common/fixtures'); if (!common.hasCrypto) common.skip('missing crypto'); +const https = require('https'); const options = { key: fixtures.readKey('agent1-key.pem'),