Skip to content
Closed
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
6 changes: 5 additions & 1 deletion test/common/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ const {

const noop = () => {};

const hasCrypto = Boolean(process.versions.openssl);

const isMainThread = (() => {
try {
return require('worker_threads').isMainThread;
Expand Down Expand Up @@ -73,6 +75,9 @@ if (process.argv.length === 2 &&
const args = process.execArgv.map((arg) => arg.replace(/_/g, '-'));
for (const flag of flags) {
if (!args.includes(flag) &&
// If the binary was built without-ssl then the crypto flags are
// invalid (bad option). The test itself should handle this case.
hasCrypto &&
// If the binary is build without `intl` the inspect option is
// invalid. The test itself should handle this case.
(process.config.variables.v8_enable_inspector !== 0 ||
Expand Down Expand Up @@ -105,7 +110,6 @@ const rootDir = isWindows ? 'c:\\' : '/';

const buildType = process.config.target_defaults.default_configuration;

const hasCrypto = Boolean(process.versions.openssl);

// If env var is set then enable async_hook hooks for all tests.
if (process.env.NODE_TEST_WITH_ASYNC_HOOKS) {
Expand Down