From 1191b7202d86f01857f74d0709792fb74eac5a37 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 8 Feb 2017 11:56:52 -0800 Subject: Improve Node and libuv testing and test coverage Allow Node tests to run with or without UV, change default version to 7, add some portability tests. Also make some more core tests work with libuv --- templates/binding.gyp.template | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) (limited to 'templates') diff --git a/templates/binding.gyp.template b/templates/binding.gyp.template index 4b2f6ac12b..9d7034e18b 100644 --- a/templates/binding.gyp.template +++ b/templates/binding.gyp.template @@ -40,7 +40,12 @@ # https://n8.io/converting-a-c-library-to-gyp/ { 'variables': { - 'runtime%': 'node' + 'runtime%': 'node', + # UV integration in C core is disabled by default while bugs are ironed + # out. It can be re-enabled for one build by setting the npm config + # variable grpc_uv to true, and it can be re-enabled permanently by + # setting it to true here. + 'grpc_uv%': 'false' }, 'target_defaults': { 'include_dirs': [ @@ -51,11 +56,11 @@ 'GPR_BACKWARDS_COMPATIBILITY_MODE' ], 'conditions': [ - ['runtime=="node"', { + ['runtime=="node" and grpc_uv=="true"', { 'defines': [ # Disabling this while bugs are ironed out. Uncomment this to # re-enable libuv integration in C core. - # 'GRPC_UV' + 'GRPC_UV' ] }], ['OS!="win" and runtime=="electron"', { @@ -72,19 +77,10 @@ 'OPENSSL_NO_ASM' ] }, { - # Based on logic above, we know that this must be a non-Windows system - 'variables': { - # The output of "node --version" is "v[version]". We use cut to - # remove the first character. - 'target%': '0. - # io.js always reports versions >0 and always exports ALPN symbols. - # Therefore, Node's major version will be truthy if and only if it - # supports ALPN. The target is "[major].[minor].[patch]". We split by - # periods and take the first field to get the major version. + # As of the beginning of 2017, we only support versions of Node with + # embedded versions of OpenSSL that support ALPN 'defines': [ - 'TSI_OPENSSL_ALPN_SUPPORT=