Skip to content

Commit c719f7a

Browse files
committed
test: allow disabling crypto tests
PR-URL: #31268 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: David Carlier <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
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

+4
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

+2-1
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)