Skip to content

Commit

Permalink
test: skipIfInspectorDisabled cluster-inspect-brk
Browse files Browse the repository at this point in the history
When configured --without-ssl the inspect-brk option will not be
available and the process will exit with a exit value of 9 "Invalid
Argument/Bad option".

This commit adds a skipIfInspectorDisabled check since --without-ssl
implies that no inspector support is build as well.

PR-URL: #12757
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
danbev authored and MylesBorins committed Oct 25, 2017
1 parent 7b9710d commit d25dc79
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/common/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -575,3 +575,10 @@ exports.crashOnUnhandledRejection = function() {
process.on('unhandledRejection',
(err) => process.nextTick(() => { throw err; }));
};

exports.skipIfInspectorDisabled = function skipIfInspectorDisabled() {
if (!exports.hasCrypto) {
exports.skip('missing ssl support so inspector is disabled');
process.exit(0);
}
};
1 change: 1 addition & 0 deletions test/sequential/test-cluster-inspect-brk.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use strict';
const common = require('../common');
common.skipIfInspectorDisabled();

// A test to ensure that cluster properly interoperates with the
// --inspect-brk option.
Expand Down

0 comments on commit d25dc79

Please sign in to comment.