From 55d796d1b52f80adb5ad83b2000fb834021135f1 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 --- 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.