diff options
author | Daniel Bevenius <daniel.bevenius@gmail.com> | 2017-03-01 08:16:48 +0100 |
---|---|---|
committer | Daniel Bevenius <daniel.bevenius@gmail.com> | 2017-03-04 20:16:52 +0100 |
commit | 1402fef098309bf7fd902d0be86cd8a1a3e07b86 (patch) | |
tree | 189a1119a63898f9ea38d3fd6992f22d66f00b6e /test/addons | |
parent | 93525287791c8b16012a146623982d31e1f18775 (diff) | |
download | android-node-v8-1402fef098309bf7fd902d0be86cd8a1a3e07b86.tar.gz android-node-v8-1402fef098309bf7fd902d0be86cd8a1a3e07b86.tar.bz2 android-node-v8-1402fef098309bf7fd902d0be86cd8a1a3e07b86.zip |
test: make tests pass when configured without-ssl
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>
Diffstat (limited to 'test/addons')
-rw-r--r-- | test/addons/openssl-binding/binding.gyp | 8 | ||||
-rw-r--r-- | test/addons/openssl-binding/test.js | 4 |
2 files changed, 10 insertions, 2 deletions
diff --git a/test/addons/openssl-binding/binding.gyp b/test/addons/openssl-binding/binding.gyp index 672f84bb86..bafde41348 100644 --- a/test/addons/openssl-binding/binding.gyp +++ b/test/addons/openssl-binding/binding.gyp @@ -2,8 +2,12 @@ 'targets': [ { 'target_name': 'binding', - 'sources': ['binding.cc'], - 'include_dirs': ['../../../deps/openssl/openssl/include'], + 'conditions': [ + ['node_use_openssl=="true"', { + 'sources': ['binding.cc'], + 'include_dirs': ['../../../deps/openssl/openssl/include'], + }] + ] }, ] } diff --git a/test/addons/openssl-binding/test.js b/test/addons/openssl-binding/test.js index a146ffe5c6..452f59f752 100644 --- a/test/addons/openssl-binding/test.js +++ b/test/addons/openssl-binding/test.js @@ -1,6 +1,10 @@ 'use strict'; const common = require('../../common'); +if (!common.hasCrypto) { + common.skip('missing crypto'); + process.exit(0); +} const assert = require('assert'); const binding = require(`./build/${common.buildType}/binding`); const bytes = new Uint8Array(1024); |