Skip to content

Commit a6126cc

Browse files
dmabupttargos
authored andcommitted
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: nodejs#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>
1 parent 3b2e49a commit a6126cc

2 files changed

Lines changed: 30 additions & 13 deletions

File tree

test/addons/openssl-binding/binding.gyp

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,25 @@
33
{
44
'target_name': 'binding',
55
'includes': ['../common.gypi'],
6-
'variables': {
7-
# Skip this building on IBM i.
8-
'aix_variant_name': '<!(uname -s)',
9-
},
106
'conditions': [
11-
['node_use_openssl=="true" and '
12-
'"<(aix_variant_name)"!="OS400"', {
13-
'sources': ['binding.cc'],
14-
'include_dirs': ['../../../deps/openssl/openssl/include'],
7+
['node_use_openssl=="true"', {
8+
'conditions': [
9+
['OS=="aix"', {
10+
'variables': {
11+
# Used to differentiate `AIX` and `OS400`(IBM i).
12+
'aix_variant_name': '<!(uname -s)',
13+
},
14+
'conditions': [
15+
[ '"<(aix_variant_name)"!="OS400"', { # Not `OS400`(IBM i)
16+
'sources': ['binding.cc'],
17+
'include_dirs': ['../../../deps/openssl/openssl/include'],
18+
}],
19+
],
20+
}, {
21+
'sources': ['binding.cc'],
22+
'include_dirs': ['../../../deps/openssl/openssl/include'],
23+
}],
24+
],
1525
}],
1626
['OS=="mac"', {
1727
'xcode_settings': {

test/addons/zlib-binding/binding.gyp

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,19 @@
22
'targets': [
33
{
44
'target_name': 'binding',
5-
'variables': {
6-
# Skip this building on IBM i.
7-
'aix_variant_name': '<!(uname -s)',
8-
},
95
'conditions': [
10-
[ '"<(aix_variant_name)"!="OS400"', {
6+
['OS=="aix"', {
7+
'variables': {
8+
# Used to differentiate `AIX` and `OS400`(IBM i).
9+
'aix_variant_name': '<!(uname -s)',
10+
},
11+
'conditions': [
12+
[ '"<(aix_variant_name)"!="OS400"', { # Not `OS400`(IBM i)
13+
'sources': ['binding.cc'],
14+
'include_dirs': ['../../../deps/zlib'],
15+
}],
16+
],
17+
}, {
1118
'sources': ['binding.cc'],
1219
'include_dirs': ['../../../deps/zlib'],
1320
}],

0 commit comments

Comments
 (0)