Skip to content

Commit

Permalink
test: allow disabling crypto tests
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
codebytere authored and MylesBorins committed Jan 16, 2020
1 parent 79eba6a commit 1df7961
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions test/common/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion test/common/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 1df7961

Please sign in to comment.