mirror of
https://github.com/nodejs/node.git
synced 2025-05-12 03:10:50 +00:00

Currently when node is build --without-ssl and the test are run, there are a number of failing test due to tests expecting crypto support to be available. This commit fixes fixes the failure and instead skips the tests that expect crypto to be available. PR-URL: https://github.com/nodejs/node/pull/11631 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
42 lines
1.2 KiB
JavaScript
42 lines
1.2 KiB
JavaScript
'use strict';
|
|
// Flags: --inspect={PORT}
|
|
const common = require('../common');
|
|
common.skipIfInspectorDisabled();
|
|
const assert = require('assert');
|
|
const cluster = require('cluster');
|
|
const debuggerPort = common.PORT;
|
|
|
|
if (cluster.isMaster) {
|
|
function checkExitCode(code, signal) {
|
|
assert.strictEqual(code, 0);
|
|
assert.strictEqual(signal, null);
|
|
}
|
|
|
|
function fork(offset, execArgv) {
|
|
if (execArgv)
|
|
cluster.setupMaster({execArgv});
|
|
|
|
const check = common.mustCall(checkExitCode);
|
|
cluster.fork({portSet: debuggerPort + offset}).on('exit', check);
|
|
}
|
|
|
|
assert.strictEqual(process.debugPort, debuggerPort);
|
|
|
|
fork(1);
|
|
fork(2, ['--inspect']);
|
|
fork(3, [`--inspect=${debuggerPort}`]);
|
|
fork(4, ['--inspect', '--debug']);
|
|
fork(5, [`--debug=${debuggerPort}`, '--inspect']);
|
|
fork(6, ['--inspect', `--debug-port=${debuggerPort}`]);
|
|
fork(7, [`--inspect-port=${debuggerPort}`]);
|
|
fork(8, ['--inspect', `--inspect-port=${debuggerPort}`]);
|
|
} else {
|
|
const hasDebugArg = process.execArgv.some(function(arg) {
|
|
return /inspect/.test(arg);
|
|
});
|
|
|
|
assert.strictEqual(hasDebugArg, true);
|
|
assert.strictEqual(process.debugPort, +process.env.portSet);
|
|
process.exit();
|
|
}
|