Skip to content

Commit be055d1

Browse files
codebytereTrott
authored andcommitted
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 f4797ff commit be055d1

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
@@ -570,6 +570,10 @@ If set, `NODE_COMMON_PORT`'s value overrides the `common.PORT` default value of
570570

571571
If set, command line arguments passed to individual tests are not validated.
572572

573+
### `NODE_SKIP_CRYPTO`
574+
575+
If set, crypto tests are skipped.
576+
573577
### `NODE_TEST_KNOWN_GLOBALS`
574578

575579
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)