Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: allow disabling crypto tests #31268

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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