Skip to content

Commit

Permalink
test: only detect uname on supported os
Browse files Browse the repository at this point in the history
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: #32833
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
Reviewed-By: Ujjwal Sharma <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
  • Loading branch information
dmabupt authored and ryzokuken committed Apr 16, 2020
1 parent 0bd5595 commit b61488f
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 13 deletions.
26 changes: 18 additions & 8 deletions test/addons/openssl-binding/binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -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': {
Expand Down
17 changes: 12 additions & 5 deletions test/addons/zlib-binding/binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
}],
Expand Down

0 comments on commit b61488f

Please sign in to comment.