From 9e89edff87fea4ca13c2ffde63ec95457316c56e Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Wed, 12 Apr 2017 12:28:33 +0200 Subject: [PATCH] test: add hasCrypto check to test-debug-usage When configuring --without-ssl test-debug-usage.js fails with the following error: assert.js:82 throw new assert.AssertionError({ ^ AssertionError: false == true at ChildProcess. (/Users/danielbevenius/work/nodejs/node/test/parallel/test-debug-usage.js:24:5) at ChildProcess. (/Users/danielbevenius/work/nodejs/node/test/common.js:461:15) at emitTwo (events.js:125:13) at ChildProcess.emit (events.js:213:7) at Process.ChildProcess._handle.onexit (internal/child_process.js:208:12) But the underlying error is the following: (node:55665) [DEP0068] DeprecationWarning: `node debug` is deprecated. Please use `node inspect` instead. internal/util.js:83 throw new Error('Node.js is not compiled with openssl crypto support'); ^ Error: Node.js is not compiled with openssl crypto support at Object.exports.assertCrypto (internal/util.js:83:11) at crypto.js:28:14 at NativeModule.compile (bootstrap_node.js:559:7) at NativeModule.require (bootstrap_node.js:500:18) at node-inspect/lib/internal/inspect_client.js:24:16 at NativeModule.compile (bootstrap_node.js:559:7) at NativeModule.require (bootstrap_node.js:500:18) at node-inspect/lib/_inspect.js:39:5 at NativeModule.compile (bootstrap_node.js:559:7) at Function.NativeModule.require (bootstrap_node.js:500:18) assert.js:82 throw new assert.AssertionError({ ^ AssertionError: false == true at ChildProcess. (/Users/danielbevenius/work/nodejs/node/test/parallel/test-debug-usage.js:25:5) at ChildProcess. (/Users/danielbevenius/work/nodejs/node/test/common.js:461:15) at emitTwo (events.js:125:13) at ChildProcess.emit (events.js:213:7) at Process.ChildProcess._handle.onexit (internal/child_process.js:208:12) This commit adds a check for crypto like some of the other tests do. PR-URL: https://github.com/nodejs/node/pull/12357 Reviewed-By: James M Snell Reviewed-By: Sakthipriyan Vairamani Reviewed-By: Colin Ihrig Reviewed-By: Anna Henningsen --- test/parallel/test-debug-usage.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/parallel/test-debug-usage.js b/test/parallel/test-debug-usage.js index 67ee08ce729431..9d84486a0b08d2 100644 --- a/test/parallel/test-debug-usage.js +++ b/test/parallel/test-debug-usage.js @@ -3,6 +3,11 @@ const common = require('../common'); const assert = require('assert'); const spawn = require('child_process').spawn; +if (!common.hasCrypto) { + common.skip('missing crypto'); + return; +} + const child = spawn(process.execPath, ['debug']); child.stderr.setEncoding('utf8');