From 9c8a9f1133e1115ed6645cf6f984d78c2153ee96 Mon Sep 17 00:00:00 2001 From: Yihong Wang Date: Tue, 24 Jul 2018 13:44:09 -0700 Subject: [PATCH] build: skip cctest on Windows shared lib build cctest depends on some internal APIs which don't declare `__declspec(dllexport)` and causes build failure when building node as shared lib on Windows. Since we already have good test coverage in static lib, we decide to skip the cctest in shared lib build on Windows. Signed-off-by: Yihong Wang PR-URL: https://github.com/nodejs/node/pull/21228 Reviewed-By: Refael Ackermann --- node.gyp | 4 ++++ vcbuild.bat | 1 + 2 files changed, 5 insertions(+) diff --git a/node.gyp b/node.gyp index 3e14fa6c546fb9..4477bf59f151d7 100644 --- a/node.gyp +++ b/node.gyp @@ -1001,6 +1001,10 @@ ['OS=="solaris"', { 'ldflags': [ '-I<(SHARED_INTERMEDIATE_DIR)' ] }], + # Skip cctest while building shared lib node for Windows + [ 'OS=="win" and node_shared=="true"', { + 'type': 'none', + }], ], } ], # end targets diff --git a/vcbuild.bat b/vcbuild.bat index e237cf9ee547b8..0c7bd0f48b2d95 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -529,6 +529,7 @@ if "%test_args%"=="" goto test-v8 if "%config%"=="Debug" set test_args=--mode=debug %test_args% if "%config%"=="Release" set test_args=--mode=release %test_args% if defined no_cctest echo Skipping cctest because no-cctest was specified && goto run-test-py +if not exist %config%\cctest.exe goto run-test-py echo running 'cctest %cctest_args%' "%config%\cctest" %cctest_args% :run-test-py