From 427cd293d593511f3f592f3bcf99b0f4b4900fda Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Thu, 27 Apr 2017 10:11:40 +0200 Subject: [PATCH] test: add hasCrypto check to test-cli-node-options Currently when configure --without-ssl the test will throw the following error: bad option: --use-openssl-ca This commit checks if crypto was enabled and skips the crypto related tests if that is the case. PR-URL: https://github.com/nodejs/node/pull/12692 Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Sam Roberts / --- test/parallel/test-cli-node-options.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/parallel/test-cli-node-options.js b/test/parallel/test-cli-node-options.js index 90e995af9beb9f..47fd4b85c7c557 100644 --- a/test/parallel/test-cli-node-options.js +++ b/test/parallel/test-cli-node-options.js @@ -53,9 +53,11 @@ expect('--track-heap-objects', 'B\n'); expect('--throw-deprecation', 'B\n'); expect('--zero-fill-buffers', 'B\n'); expect('--v8-pool-size=10', 'B\n'); -expect('--use-openssl-ca', 'B\n'); -expect('--use-bundled-ca', 'B\n'); -expect('--openssl-config=_ossl_cfg', 'B\n'); +if (common.hasCrypto) { + expect('--use-openssl-ca', 'B\n'); + expect('--use-bundled-ca', 'B\n'); + expect('--openssl-config=_ossl_cfg', 'B\n'); +} expect('--icu-data-dir=_d', 'B\n'); // V8 options