Skip to content

Commit c719f7a

Browse files
committed
test: allow disabling crypto tests
PR-URL: #31268 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
1 parent cb40a1a commit c719f7a

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

test/common/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,10 @@ If set, `NODE_COMMON_PORT`'s value overrides the `common.PORT` default value of
596596

597597
If set, command line arguments passed to individual tests are not validated.
598598

599+
### `NODE_SKIP_CRYPTO`
600+
601+
If set, crypto tests are skipped.
602+
599603
### `NODE_TEST_KNOWN_GLOBALS`
600604

601605
A comma-separated list of variables names that are appended to the global

test/common/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ if (isMainThread)
4848

4949
const noop = () => {};
5050

51-
const hasCrypto = Boolean(process.versions.openssl);
51+
const hasCrypto = Boolean(process.versions.openssl) &&
52+
!process.env.NODE_SKIP_CRYPTO;
5253

5354
// Check for flags. Skip this for workers (both, the `cluster` module and
5455
// `worker_threads`) and child processes.

0 commit comments

Comments
 (0)