From be055d103c85d4b716f3013f8c63b39c7dc0425b Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Wed, 8 Jan 2020 20:52:13 -0800 Subject: [PATCH] test: allow disabling crypto tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/31268 Reviewed-By: Anna Henningsen Reviewed-By: David Carlier Reviewed-By: Richard Lau Reviewed-By: Ruben Bridgewater Reviewed-By: Rich Trott Reviewed-By: Colin Ihrig Reviewed-By: Tobias Nießen Reviewed-By: James M Snell Reviewed-By: Michael Dawson --- test/common/README.md | 4 ++++ test/common/index.js | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/test/common/README.md b/test/common/README.md index dcccb77f63f92c..d43b0ebbff39af 100644 --- a/test/common/README.md +++ b/test/common/README.md @@ -570,6 +570,10 @@ If set, `NODE_COMMON_PORT`'s value overrides the `common.PORT` default value of If set, command line arguments passed to individual tests are not validated. +### `NODE_SKIP_CRYPTO` + +If set, crypto tests are skipped. + ### `NODE_TEST_KNOWN_GLOBALS` A comma-separated list of variables names that are appended to the global diff --git a/test/common/index.js b/test/common/index.js index a231c45e1eb525..300ea60377876b 100644 --- a/test/common/index.js +++ b/test/common/index.js @@ -48,7 +48,8 @@ if (isMainThread) const noop = () => {}; -const hasCrypto = Boolean(process.versions.openssl); +const hasCrypto = Boolean(process.versions.openssl) && + !process.env.NODE_SKIP_CRYPTO; // Check for flags. Skip this for workers (both, the `cluster` module and // `worker_threads`) and child processes.