diff options
author | Xu Meng <mengxumx@cn.ibm.com> | 2020-04-13 18:41:00 -0500 |
---|---|---|
committer | Ujjwal Sharma <ryzokuken@disroot.org> | 2020-04-16 08:58:37 +0530 |
commit | b61488fe24ba0df85d0fc76703d769ed68e6920c (patch) | |
tree | 764b8a13efeb1f25be124085ac486f220cc7c349 | |
parent | 0bd559550929967e760a646ef835da832a3b4cc7 (diff) | |
download | node-new-b61488fe24ba0df85d0fc76703d769ed68e6920c.tar.gz |
test: only detect uname on supported os
To skip some tests on IBMi PASE, we use
uname to detect the true os name, but
on Windows machines there is no uname
available.
PR-URL: https://github.com/nodejs/node/pull/32833
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Ujjwal Sharma <ryzokuken@disroot.org>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
-rw-r--r-- | test/addons/openssl-binding/binding.gyp | 26 | ||||
-rw-r--r-- | test/addons/zlib-binding/binding.gyp | 17 |
2 files changed, 30 insertions, 13 deletions
diff --git a/test/addons/openssl-binding/binding.gyp b/test/addons/openssl-binding/binding.gyp index 06c5d15057..c9ce9f1b2a 100644 --- a/test/addons/openssl-binding/binding.gyp +++ b/test/addons/openssl-binding/binding.gyp @@ -3,15 +3,25 @@ { 'target_name': 'binding', 'includes': ['../common.gypi'], - 'variables': { - # Skip this building on IBM i. - 'aix_variant_name': '<!(uname -s)', - }, 'conditions': [ - ['node_use_openssl=="true" and ' - '"<(aix_variant_name)"!="OS400"', { - 'sources': ['binding.cc'], - 'include_dirs': ['../../../deps/openssl/openssl/include'], + ['node_use_openssl=="true"', { + 'conditions': [ + ['OS=="aix"', { + 'variables': { + # Used to differentiate `AIX` and `OS400`(IBM i). + 'aix_variant_name': '<!(uname -s)', + }, + 'conditions': [ + [ '"<(aix_variant_name)"!="OS400"', { # Not `OS400`(IBM i) + 'sources': ['binding.cc'], + 'include_dirs': ['../../../deps/openssl/openssl/include'], + }], + ], + }, { + 'sources': ['binding.cc'], + 'include_dirs': ['../../../deps/openssl/openssl/include'], + }], + ], }], ['OS=="mac"', { 'xcode_settings': { diff --git a/test/addons/zlib-binding/binding.gyp b/test/addons/zlib-binding/binding.gyp index 8c559cd715..f0f6d62a5f 100644 --- a/test/addons/zlib-binding/binding.gyp +++ b/test/addons/zlib-binding/binding.gyp @@ -2,12 +2,19 @@ 'targets': [ { 'target_name': 'binding', - 'variables': { - # Skip this building on IBM i. - 'aix_variant_name': '<!(uname -s)', - }, 'conditions': [ - [ '"<(aix_variant_name)"!="OS400"', { + ['OS=="aix"', { + 'variables': { + # Used to differentiate `AIX` and `OS400`(IBM i). + 'aix_variant_name': '<!(uname -s)', + }, + 'conditions': [ + [ '"<(aix_variant_name)"!="OS400"', { # Not `OS400`(IBM i) + 'sources': ['binding.cc'], + 'include_dirs': ['../../../deps/zlib'], + }], + ], + }, { 'sources': ['binding.cc'], 'include_dirs': ['../../../deps/zlib'], }], |